5 回答

TA贡献18条经验 获得超15个赞
1、<input type="button" value="隐藏内容" oncClick='cont1()'>;
typo:oncClick-onclick;
2、不可以使用width和reset作为函数名,给width()函数和reset()函数换一个其他合乎规范的名字就可以;
3、reset()函数里,var mary=document.getElementById("text"),应为var mary=document.getElementById("txt");

TA贡献11条经验 获得超3个赞
不可以使用width和reset作为函数名,给width()函数和reset()函数换一个其他合乎规范的名字就可以; <input type="button" value="改变颜色" onClick='color()'>;
<input type="button" value="改变宽高" onClick='width()'>;
<input type="button" value="隐藏内容" oncClick='cont1()'>;
<input type="button" value="显示内容"
onClick='cont2'>;
<input type="button" value="取消设置"
onClick='reset()'>;这后面谁教你的写分号?
添加回答
举报