1 回答
TA贡献1891条经验 获得超3个赞
解决方案是通过 Javascript 中的 onclick 事件调用发送电子邮件函数。
<body>
<section>
<div class="contact-container">
<h1>Contact</h1>
<form method="post">
<div class="contact-input-container">
<div>
<input formaction="/contact" name="email" class="contact-input contact-email" type="text" placeholder="name@gmail.com" autocomplete="off">
</div>
<div>
<input formaction="/contact" name="subject" class="contact-input contact-subject" type="text" placeholder="subject.." autocomplete="off">
</div>
<div>
<textarea formaction="/contact" name="message" class="contact-input contact-message" type="text" placeholder="message.."></textarea>
</div>
</div>
<button formaction="/contact" type="submit" class="paypal-btn-check" onclick="simple_gaming_radio_check();">
<input formaction="https://www.paypal.com/cgi-bin/webscr" type="hidden" name="cmd" value="_s-xclick">
<input formaction="https://www.paypal.com/cgi-bin/webscr" type="hidden" name="hosted_button_id" value="W6SHV472B68TC">
<input type="submit" onclick="sendMail()" formaction="https://www.paypal.com/cgi-bin/webscr" name="submit">
</button>
</form>
</div>
</section>
你的 JavaScript 代码将是这样的
function sendMail(){
//Your sending mail code will go here
alert("Mail Sent")
}
- 1 回答
- 0 关注
- 235 浏览
添加回答
举报