问题描述
是否有向jQuery Mobile表单添加验证的最佳实践"?由于jQuery的文档加载功能不会触发,因此我不知道可以将客户端验证放在何处.
Is there a "best practice" for adding validation to jQuery Mobile forms? Since the Document Load function of jQuery doesn't fire, I don't understand where I can put client-side validation.
文档并没有帮助,我完成了一些教程,甚至买了一本jQuery Mobile书籍,但都没有涉及验证.
The documentation didn't help and I have done several tutorials and even bought a jQuery Mobile book, but none addresses validation.
预先感谢,乔恩
推荐答案
我实际上建议使用一个JQuery验证插件,例如 http://docs.jquery.com/Plugins/Validation .我在我的JQuery Mobile应用程序中使用了它,它的工作原理与您在网络上进行的工作相同.
I would actually recommend using a JQuery validation plug-in like the one at http://docs.jquery.com/Plugins/Validation. I used it in my JQuery Mobile app and it works just the same as if you were doing it on the web.
这篇关于验证jQuery Mobile表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!