设置个文本框  和一个按钮,输入文字,按按钮后,把所输进去的文字以各种字体字体显示出来。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script>
function show()
{
 var a1=document.getElementById("a1");
var show=document.getElementById("show");
var a1=document.getElementById("a1");
var show=document.getElementById("show");document.writeln("<p>Big: " + a1.big() + "</p>")
document.writeln("<p>Small: " + a1.small() + "</p>")document.writeln("<p>Bold: " + a1.bold() + "</p>")
document.writeln("<p>Italic: " + a1.italics() + "</p>")document.writeln("<p>Blink: " + a1.blink() + " (does not work in IE)</p>")
document.writeln("<p>Fixed: " + a1.fixed() + "</p>")
document.writeln("<p>Strike: " + a1.strike() + "</p>")document.writeln("<p>Fontcolor: " + a1.fontcolor("Red") + "</p>")
document.writeln("<p>Fontsize: " + a1.fontsize(16) + "</p>")document.writeln("<p>Lowercase: " + a1.toLowerCase() + "</p>")
document.writeln("<p>Uppercase: " + a1.toUpperCase() + "</p>")document.writeln("<p>Subscript: " + a1.sub() + "</p>")
document.writeln("<p>Superscript: " + a1.sup() + "</p>")document.writeln("<p>Link: " + a1.link("") + "</p>")}}
</script>
</head><body>
<input name="a1" type="text" id="a1" /><input type="button" name="Submit" value="按钮" onclick="show();" />
<div id="show"></div>
</body>
</html>
这是自己写的,不能运行  请大大帮忙