php - Hide and Show TextBox in Javascript -
i trying hide , show box using following code. work box displayed default. can hide box , display on click? onclick works hide box.
<script type="text/javascript"> function display(id) { var obj = document.getelementbyid(id) if (obj.style.display == "none") { obj.style.display = "block" } else { obj.style.display = "none" } return false } </script> <form> <input type="button" value="customize" onclick="display('box1_<?=$pd_id?>')"> <input type="submit"> </form>
addthe following either in stylesheet or inline styling
style="display: none;"
Comments
Post a Comment