开发者

javascript make form vanish when submit?

开发者 https://www.devze.com 2023-02-02 11:25 出处:网络
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 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

精彩评论

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