mhas01
asked on
how to hide <div> in html or prevent an <input type='text'> from being printed
Hi experts.
As the title of the question states, I need to understand by examples:
how to hide a <div> element in html
and also I need to prevent an <input type='text'> from being printed (maybe putting it inside another div element)
DYNAMICALLY, and using Javascript maybe leveraging css styles and JQuery would be preferable.
Thanks in advance
As the title of the question states, I need to understand by examples:
how to hide a <div> element in html
and also I need to prevent an <input type='text'> from being printed (maybe putting it inside another div element)
DYNAMICALLY, and using Javascript maybe leveraging css styles and JQuery would be preferable.
Thanks in advance
<div style="display: none"></div> will disappear the div tag
<div style="visible: false"></div> will hide the content of the div tag
<div style="visible: false"></div> will hide the content of the div tag
you can call these using javascript
Use document.getElementById('i d')
http://www.w3schools.com/htmldom/dom_nodes_access.asp
http://www.w3schools.com/jsref/dom_obj_node.asp
Use document.getElementById('i
http://www.w3schools.com/htmldom/dom_nodes_access.asp
http://www.w3schools.com/jsref/dom_obj_node.asp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That will hide the div and contents from being displayed. To assign it via javascript or jquery you just use whatever event you want to trigger it and assign the preferred style to the preferred object.