解决方案 »
- 页面报javax.servlet.ServletException: Request[/policyrevert] does not contain handl
- alai_tree.js 在火狐中使用问题
- mp3搜索接口的问题
- js在FF或chrome下,无法获取checkbox的值
- 怎样判断文本框内输入的日期符合yyyy-mm-dd格式,并且输入的日期有效?
- 求助一个简单问题
- js如何判断字符串是否包含某些特定的中文字符
- 大家来讨论下js判断,字符串中我符号为什么会被去掉
- 谁能帮我写一行代码,当鼠标移至时select文本...鼠票移开时取消select
- 求助:如何获取网页上的资料,整合到Excel表中
- jquery.post()的问题,怎么更改网络框架给出的例子
- 在第一个和第二个文本框中各输入1个数,点击右边的button,将最大值输出到第三个文本框,我写的程序哪出问题了
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>mydiv</title>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script language="javascript">
function Change(){
//document.getElementById("Select").selectedIndex = 2;
$("#Select").attr('selectedIndex', 2);
}
</script>
</head>
<body>
<select id="Select">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<button onclick="Change()">Change</button>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>mydiv</title>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script language="javascript">
function Change(){
//document.getElementById("Select").selectedIndex = 2;
$("#Select").val(3);
}
</script>
</head>
<body>
<select id="Select">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<button onclick="Change()">Change</button>
</body>
</html>