<html> <script language="JavaScript"> function changFont( x ){ var font_style = x; var article = document.getElementById("article"); if( typeof font_style == "string" ){ article.style.fontWeight = font_style; } else { article.style.fontSize = font_style; } } </script> <body> <p> <a onClick="changFont('normal');">正常</a> <a onClick="changFont('bold');">粗体</a> <a onClick="changFont(14);">小号</a> <a onClick="changFont(18);">大号</a> </p> <p id="article"> 我是一些文字 ...<br /> Some Text ... </p> </body> </html>