javascript据option的value值快速设定初始的selected选项
发布时间:2016-12-30 来源:查字典编辑
摘要:writtenbymisshjn
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>writtenbymisshjn</title>
<SCRIPTLANGUAGE="JavaScript">
<>
</SCRIPT>
</head>
<body>
<>
<SCRIPTLANGUAGE="JavaScript">
<>
</SCRIPT>
<inputtype="button"value="选中value=2001的选项"onclick="test('2001')">
<inputtype="button"value="随机选择"onclick="randomselect()">
</body>
</html>