请问为什么我的代码只能显示出文本内容,但是点击按钮都完全没有变化?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=bg2312"/>
<title>综合编程练习</title>
<style type="text/css">
*{font-size:12px}
#txt{width:200px;height:400px;border:#333 solid 1px;padding:5px}
p{line-height:20px;text-indent:2em}
</style>
</head>
<body>
<h2 id="con">JavaScript编程</h2>
<div id="txt">
<h5>JavaScript为网页添加动态效果并实现与用户交互能力</h5>
<p>1、入门篇</p>
<p>2、进阶篇</p>
<p>3、深入学习</p>
</div>
<form>
<input type="button" name="button" value="改变颜色" onClick="set.color()"/>
<input type="button" name="button" value="改变尺寸" onClick="set.size()"/>
<input type="button" name="button" value="隐藏文本" onClick="set.hide()"/>
<input type="button" name="button" value="显示文本" onClick="set.show()"/>
<input type="button" name="button" value="恢复设置" onClick="set.remove()"/>
</form>
<script type="text/javascript">
var mychar=document.getElementById("txt");
var set={
color:function(){
mychar.style.color="red";
mychar.style.background="blue";
}
size:function(){
mychar.style.width="400px";
mychar.style.heoght="200px";
}
hide:function(){
mychar.style.display="none";
}
show:function(){
mychar.style.display="block";
}
remove:function(){
var sure=confirm("确认恢复设置?");
if(sure==true)
{mychar.removeAttribute('style');}
}
}
</script>
</body>
</html>