javascript make form vanish when submit?
Is I have a form on my website for people to submit their em开发者_运维技巧ail address. I'm trying to make it so it vanishes after they enter it to stop people entering multiple emails.
Is their a way to make the form input box and submit button vanish after the button has been clicked?
Ugly, but would do the trick.
<form onsubmit="this.style.display='none';">
With a little more JS (probably using jQuery / Mootools or the like) you could make the vanishing a bit less harsh.
精彩评论