开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜