选中下拉select的特定option
<html>
<head>
</head>
<body>
<table align="center" id="addTable">
<tr>
<td width="70" name="form.dateType">
<option value="2"></option>
<option value="0">时间1</option>
<option value="1">时间2</option>
</select>
</td>
</tr>
</table>
</body>
<script type="text/javascript">
SelectOption("dateType",时间1);
function SelectOption(id,value) {
var obj = document.getElementById(id);
if(value!='') {
for(var i=0;i<obj.options.length;i++){
if(obj.options[i].value==value) {
obj.options[i].selected = true;
break;
}
}
}
}
</script>
</html>