H5 form validation not supported by Chrome - Stack Overflow
仅有的幸福
仅有的幸福 2017-05-16 12:58:42
0
1
460

required oninvalid="setCustomValidity('Please enter the product name');" oninput="setCustomValidity('');"

Use the above code in the form element. The id of the
form form is goodsForm

goodsForm.submit If used normally in Firefox, it will not be submitted if it is empty. If it is filled in correctly, it will be submitted. If Chrome prompts that it is not empty, it will still be submitted.
Please answer, thank you

仅有的幸福
仅有的幸福

reply all(1)
漂亮男人

If it is judged to be empty and is not submitted, then add return false;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template