How do you make the maximum value of a number input field equal to a javascript variable? This variable will change, and the max needs to change with it.
You can't define it the way you can with php, and I'm not very familiar with javascript and my searches have brought up nothing.
<input type="number" min="1" max="*jsvariable*">
Sample Fiddle: http://jsfiddle.net/KDJdZ/