下拉菜单选择(jQuery实现)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>selct_val</title>
<meta name="author" content="Administrator" />
<script type="text/javascript" src="script/jquery-1.12.2.js"></script>
<!-- Date: 2016-03-23 -->
</head>
<body>
<select id="single">
<option>选择一号</option>
<option>选择二号</option>
<option>选择三号</option>
</select>
<select id="multiple" multiple="multiple" style="height:120px">
<option selected="selected">选择一号</option>
<option>选择二号</option>
<option>选择三号</option>
<option>选择四号</option>
<option selected="selected">选择五号</option>
</select>
<input type="checkbox" value="check1" />多选1
<input type="checkbox" value="check2" />多选2
<input type="checkbox" value="check3" />多选3
<input type="checkbox" value="check4" />多选4
<input type="radio" value="radio1" name="a" />单选1
<input type="radio" value="radio2" name="a" />单选2
<input type="radio" value="radio3" name="a" />单选3
</body>
<script type="text/javascript">
$("#single").val("选择二号");
$("#multiple").val(["选择二号","选择三号"]);
$(":checkbox").val(["check1","check3"]);
$(":radio").val(["radio2"]);
</script>
</html>
上一篇:print 函数的进一步理解


下一篇:回望2017,基于深度学习的NLP研究大盘点