javascript - HTML5 validation not working On OnChange select box form Submit -


HTML verification is not working on submitting a box box on on-change.

, but I need to submit the on change form and HTML% verification

  & lt; Form action = "do.php" method = "post" & gt; & Lt; Id = "myselect" name = "myselect" onchange = "this.form.submit ()" required = "" & gt; & Lt; Option value = "" & gt; & Lt; / Options & gt; Select & lt; Option value = "1" & gt; A & lt; / Options & gt; & Lt; Option value = "2" & gt; Two & lt; / Options & gt; & Lt; Option value = "3" & gt; Three & lt; / Options & gt; & Lt; Option value = "4" & gt; Four & lt; / Options & gt; & Lt; / Select & gt; & Lt; Id = "myselect2" name = "myselect2" onchange = "this.form.submit ()" required = "" & gt; & Lt; Option value = "" & gt; & Lt; / Options & gt; Select & lt; Option value = "5" & gt; Five & lt; / Options & gt; & Lt; Option value = "6" & gt; Six & lt; / Options & gt; & Lt; Option value = "7" & gt; Seven & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Form & gt;   

Submit this form to the validation box, submit it on the change form. Please help .

HTML validation applies only if the form is submitted through HTML creation. If it is submitted with a script, then there is no HTML5 validation. In this way, you need to verify your own in JavaScript.

Reference: HTML 5 LC, 4.10.22.3, where lists the conditions for the validity of item 4, which includes the requirements included submit () method Flag is not set.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -