日期:2014-05-18  浏览次数:20398 次

用javascript,当chechbox为onclick时,textbox清空。
我这么写的:
chk.attributes[ "onclick "]   =   "document.getElementById( ' "   +   textbox.clientid   +   " ').text= ' '; ";
不工作。为什么?

------解决方案--------------------
hk.attributes[ "onclick "] = "document.getElementById( ' " + textbox.clientid + " ').value= ' '; ";

把Text换成value就行了