1 回答

TA貢獻(xiàn)1891條經(jīng)驗(yàn) 獲得超3個(gè)贊
解決方案是通過(guò) Javascript 中的 onclick 事件調(diào)用發(fā)送電子郵件函數(shù)。
<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 關(guān)注
- 301 瀏覽
添加回答
舉報(bào)