我有基於輸入字段的值提交給url的重定向表單。但是如果電子郵件不正確,我的表單仍然提交。我該如何解決它?此表單的網址是dokuchaeva.com/donate/。我需要驗證是電子郵件。現代瀏覽器驗證它購買默認。如果電子郵件字段錯誤,我會提醒您,但表單仍會提交。我需要提交表單並根據插入的信息重定向到預定義的url。如何驗證表單然後提交到網址?
<form>
<label>DONATION AMOUNT</label> <input name="price" id="price" class="button" value="100" required size="6" tabindex="1"> RUB<br><br>
<label>YOUR E-MAIL</label> <input type="email" name="user_email" id="user_email" required="" placeholder="[email protected]" class="button" autofocus="autofocus" tabindex="0">
<input type="submit" id="submit" value="SUBMIT" class="button" tabindex="3" onclick="location.href= 'http://secure.onpay.ru/pay/dokuchaeva?'+'pay_mode=fix&pay_for=donation&price='+$('#price').val()+'¤cy=RUR&user_email='+$('#user_email').val()+'&pay_for=donation&convert=no&ln=en&url_success=dokuchaeva.com/donate/success.html&url_fail=dokuchaeva.com/donate/fail.html';">
</form>
https://www.google.ch/webhp?sourceid=chrome-instant&ion=1&ie=UTF-8# HL = FR&gs_nf = 3&TOK = cFdSYRBGUrI4H-PG-avtlA&PQ = jquery的%20validate%20form%20before%20submit&CP = 38&gs_id = 10&XHR = T&q = jquery的+ + +之前驗證+形式提交&PF = p&安全=關閉&sclient = PSY-AB和OQ = jquery的+驗證+形式++之前提交&gs_l =&PBX = 1&BAV = on.2,or.r_gc.r_pw.r_cp.r_qf。&FP = f65d48ad5fdc2a1b&BPCL = 38093640&離子= 1&BIW = 1200&波黑= 649 – sdespont