php - How can hide my combobox with JAvascript? -
i have combobox id name option , id name "chk" , checkbox name "chk"
and script ;i put script onclick not work ;i check script loading ;i not understand why not work ?can me?
function checkall() { //do stuff need here document.getelementbyid('option').style="none"; } <input type=\"checkbox\" name=\"chk\" value=\"chk\" onclick=\"checkall()\">
you need use display
property:
document.getelementbyid('option').style.display = "none";
this should work if have assigned element id="option"
if want check checkbox (as function name suggests), need use checked
property instead:
document.getelementbyid('option').checked = true;
Comments
Post a Comment