javascript - H5表单验证Chrome不支持
仅有的幸福
仅有的幸福 2017-05-16 12:58:42
0
1
395

required oninvalid="setCustomValidity('请输入商品名称');" oninput="setCustomValidity('');"

表单元素中使用上述代码,
form表单的id为goodsForm

goodsForm.submit 火狐正常使用为空则不提交,填写正确则提交 Chrome提示不为空后还是会提交
求解答,谢谢了

仅有的幸福
仅有的幸福

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!