Home  >  Article  >  Backend Development  >  js有关onclick的问题

js有关onclick的问题

WBOY
WBOYOriginal
2016-06-23 13:42:32830browse











四则运算
计算矩形















请输入x1:
请输入x2:
请选择计算类型:
















请输入长:
请输入宽:














中if(s=='jisuan'){

table1.style.display="block";
table2.style.display="none“;
}else if(s=='area'){

table1.style.display="none";
table2.style.display="block";
}
这一段去掉onclick就响应window.alert()了
但是加上后不但 if 执行不了,window.alert也不响应了


回复讨论(解决方案)

楼主好像selType方法里一个引号打错了...

//table2.style.display="none“;table2.style.display="none";

嗯,我太粗心了谢谢

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn