这个函数怎么写?-----在线急等 if (window.form1.select1.selectedindex>=-1){ window.form1.select1.selectedIndex=window.form1.select1.selectedIndex-1} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <form name=form1 action="1.asp"><input name=a type=button onclick="aa()"><select name="S" id="select1"> <option value="1">1</option> <option value="2">2</option> <option value="3" selected>3</option> </select> <input type=submit></form><script>function aa(){document.form1.elements["S"].options[1].selected=true}</script> <body><script>function previous(){ var s1 = document.all("s1"); if(s1.selectedIndex >= 1 ) { s1.selectedIndex = s1.selectedIndex - 1; }}function next(){ var s1 = document.all("s1"); if(s1.selectedIndex < s1.options.length - 1 ) { s1.selectedIndex = s1.selectedIndex + 1; }}</script><select id=s1><option>a</option><option>b</option><option>c</option><input type=button value="previous" onclick="previous();"><input type=button value="nex" onclick="next();"></select></body> 在线求解答 jquery的tableSorter无效 谁用过extjs的? 帮忙把extjs3.1示例下的row-editor.html改为保存到mssql数据库的? option 选择一个值之后如何对textarea进行赋值 js 改为 jQuery 急死我了,寻求帮助 xml+vml 动态画公司组织结构图!! 打开窗口的问题 ExtJs4.2 TreePanel数据刷新重复加载 js里面post跳转 状态栏+跑马灯 请问如何vbscript/javascript实现将字符串中的网址显示为链接?
<input name=a type=button onclick="aa()">
<select name="S" id="select1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected>3</option>
</select>
<input type=submit>
</form>
<script>
function aa()
{
document.form1.elements["S"].options[1].selected=true}
</script>
<script>
function previous()
{
var s1 = document.all("s1");
if(s1.selectedIndex >= 1 )
{
s1.selectedIndex = s1.selectedIndex - 1;
}
}
function next()
{
var s1 = document.all("s1");
if(s1.selectedIndex < s1.options.length - 1 )
{
s1.selectedIndex = s1.selectedIndex + 1;
}
}
</script>
<select id=s1>
<option>
a
</option>
<option>
b
</option>
<option>
c
</option>
<input type=button value="previous" onclick="previous();">
<input type=button value="nex" onclick="next();">
</select>
</body>