Here, for example, select the current month by default:
Html:
<select name= "Monat" id= "Monat" >
<option value= "1" >1</option>
<option value= "2" >2 </option>
<option value= "3" >3</option>
<option value= "4" >4</option>
<option value= "5" >5</option>
<option value= "6" >6</option>
<option value= "7" >7</option>
<option value= "8" >8</option>
<option value= "9" >9</option>
<option value= "Ten" >10</option>
<option value= "One" >11</option>
<option Value= "A" >12</option>
</select> Month
First gets the current month and dynamically selects the corresponding option under the current month for select
$ (function () {
var date=new date;
var Yue = date.getmonth () +1;
$ ("#MONAT"). Find ("Option[value = '" +yue+ "]"). attr ("Selected", "selected");
This allows the current month to be selected by default when the file load completes.