84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
How to bind jQuery.validate.js verification to a dynamically added formCan you help me a lot
If you are using asp.net mvc and use jquery.validate.unobtrusive.js (asp.net mvc’s own validation, something that can be used in combination with class features)
Then you just add this js code before loading the page
//动态表单验证 $(document).ajaxComplete(function () { $.validator.unobtrusive.parse(document); });
Is your form id predictable? If so, just write it in js:
$("#demoForm").validate();
That’s it. If even the ID is dynamically generated, just call the generated id directly in the view:
$("@ViewBag.FormId").validate();
If you are using asp.net mvc and use jquery.validate.unobtrusive.js (asp.net mvc’s own validation, something that can be used in combination with class features)
Then you just add this js code before loading the page
Is your form id predictable? If so, just write it in js:
That’s it. If even the ID is dynamically generated, just call the generated id directly in the view: