Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Click a button, show a text box. 1

Status
Not open for further replies.

kjaletyu

Programmer
Feb 5, 2006
12
GB
Hi,

In a form of my page, I want a hidden <input> appear or a text box created when users click a button on the page, so that the uses can fill something and submit it.

Is this clear?
 
Code:
<html>
<head>
<button onclick="document.getElementById('tester').style.display='inline'">test</button>
<input id="tester" type="text" style="display:none">
</body>
</html>

like that ?
 
Thanks a lot!

I have never used
style="display:none">
Is this OK for most browser?
 
Then I will use that. Thank you again for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top