Javascript examples for DOM HTML Element:Input Hidden
Change input from hidden to file
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function show(x, y) {//from w w w . ja va 2 s.c o m if (document.getElementById(y).checked) { document.getElementById(x).type = 'text'; } else { document.getElementById(x).type = 'hidden'; } } </script> </head> <body> <input id="txt" type="text" value="Hello"> <input id="chk" type="checkbox" checked onclick="show('txt', 'chk')"> </body> </html>