我有一個電子郵件註冊表單,並希望提交按鈕從「提交」更改爲「謝謝」表單發送時。一直在挖掘,一直未能找到解決方案。表單提交後更改提交按鈕的文本?
<form id="signup" action="<?=$_SERVER['PHP_SELF']; ?>" method="get">
<fieldset>
<span id="response">
<? require_once('inc/store-address.php'); if($_GET['submit']){ echo storeAddress(); } ?>
</span>
</label>
<input type="text" name="email" id="email" placeholder="your e-mail address" />
<input type="submit" name="submit" value="submit" class="btn" alt="submit" />
<div id="no-spam"><!--We'll never spam or give this address away--></div>
</fieldset>
</form>
我使用MailChimp的簡單的在這裏訂閱:http://apidocs.mailchimp.com/downloads/mcapi-simple-subscribe-jquery.zip
感謝您的幫助!
你怎麼知道的形式submited與否? YOu使用PHP或jQuery完成表單提交 –
將其更改爲'value =「謝謝」' – Barmar