How can I sett the value and text of a select option from javascript?
function getYear()
{
var d = new Date();
var year = d.getFullYear();
return year;
}
<select name="dateformat" onchange="change_date();" id="dateformat">
<option value="??" >??</option>
</select>
I want the value of getYear() in place of ??.