jQuery makes it easy to set any attributes for an element - just use the .attr()
method:
$(document).ready(function() {
$("input").attr({
"max" : 10, // substitute your own
"min" : 2 // values (or variables) here
});
});
The document ready handler is not required if your script block appears…
Top comments (0)