JavaScript to jQuery
JavaScript to jQuery
How would I change the following inline code into jQuery?
- <select name="month" id="month" onchange="setDay();">
- <script type="text/javascript">
- var monthsArray = new Array("", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
- for(var i=1; i<monthsArray.length; i++)
- {
- document.write('<option value="' + i + '">' + monthsArray[i] + '</option>');
- }
- </script>
- </select>