<html> <body> <script type="text/javascript"> var txt="Hello World!" document.write("<p>变大: " + txt.big() + "</p>") document.write("<p>变小: " + txt.small() + "</p>") document.write("<p>加粗: " + txt.bold() + "</p>") document.write("<p>倾斜: " + txt.italics() + "</p>") document.write("<p>删除线 " + txt.strike() + "</p>") document.write("<p>字体颜色: " + txt.fontcolor("Red") + "</p>") document.write("<p>字体大小: " + txt.fontsize(16) + "</p>") document.write("<p>小写: " + txt.toLowerCase() + "</p>") document.write("<p>大写: " + txt.toUpperCase() + "</p>") document.write("<p>下标: " + txt.sub() + "</p>") document.write("<p>上标: " + txt.sup() + "</p>") document.write("<p>链接: " + txt.link("http://www.w3school.com.cn") + "</p>") </script> </body> </html>