我想提交表單,但提交之前,我想調用按鈕 調用一個JS函數:我可以在html中使用按鈕提交嗎?
<input name="" type="submit" value="SEND"> // <----- submit this later
<button type="button" id="button" onClick="validateForm()">SEND THIS BEFORE</button> // <<-- call this before submitting the form
有沒有辦法在那裏結合在一起?
感謝
只需使用功能.submit()形式 –
的文檔是你的朋友http://api.jquery.com/submit –