How to add more fields in the html forms when a certain condition is met?
I want to add more fields in the html form I filled in when I checked the check box. How to do it ? Can you some give me some quick help ? Thanks
Public Comments
- <html> <body> <script type="text/javascript"> function toggle(target) { var extra = document.getElementById(target); if(extra.style.display == "none") { extra.style.display = "block"; } else { extra.style.display = "none"; } } </script> <form> <input type="checkbox" onclick="toggle('extra')"/> <div style="display: none" id="extra"> You have checked the checkbox :-) </div> </form> </body> </html>
Powered by Yahoo! Answers