1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <div align="center"> <SCRIPT LANGUAGE="JavaScript"> function changeFontSize(element,step) { step = parseInt(step,10); var el = document.getElementById(element); var curFont = parseInt(el.style.fontSize,10); el.style.fontSize = (curFont+step) + 'px'; } </script> <a href="javascript:void(0);" onClick="changeFontSize('vipcontent','2');">Increase font</a> <a href="javascript:void(0);" onClick="changeFontSize('vipcontent',-2);">Decrease font</a> <br /> <br /> <p id="vipcontent" style="font-size:12px;"> This is the test text to increase or decrease. </p> </div> |