javascript - Html Custom Attribute creation and validation -


I want to create verification for dynamically control. I have more than 25 control pages, this control visibility category And are based on subcategories. Controls are required for some categories and some of them are not necessary for this. This is the business logic behind this scene.

So what I am planning here is based on the selection of categories and sub categories, I have an html feature included = true for all required fields and < Code> onblur to validate its value on the event while clicking on the button (while posting on the server on the page) I agree to all the controls based on the isMannedated attribute I am planning.

Is this approach correct and will support all major browsers in addition to this kind of feature?

If you want to include additional features, then you need to use the prefix, then your In case:

  data-mangled = "true"  

It is supported in all major browsers. After this, use some jQuery as the data:

  var is considered = $ (selector) .attr ("data-isMandated");  

Comments