7 回答

瑜伽兔子
TA贡献10条经验 获得超3个赞
你可以在onclick="debugger;hidden()",点击这个input的时候debug会停住,这个时候你会发现this是当前这个Input,而this.hidden == false; 显而易见,hidden是当前input的一个html属性,通过js是无法覆盖的, 下面的这段代码其实是相同的道理,readOnly 同样会报错<input type="text" value="for text" onclick="readOnly()">
添加回答
举报
0/150
提交
取消