简单的焦点问题 http://www.sayee.com/cloudchen/js/MoveSwapOptions.htm 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 根据楼上提供的资料,作了一下修改:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title>New Page 1</title><script>function SwapOptions(obj,direction){ var objIndex = obj.selectedIndex; var swapIndex=direction=="up"?objIndex-1:objIndex+1; if ((swapIndex==obj.length&&direction=="down")||(swapIndex==-1&&direction=="up")||swapIndex<0) return false; obj.options[objIndex].swapNode(obj.options[swapIndex]);}</script></head><body><p><select size="7" name="D1" id="D1"> <option selected>一</option> <option>二</option> <option>三</option> <option>四</option> <option>五</option></select><input type="button" value="上" name="B1" onclick="SwapOptions(document.all.D1,'up')"><input type="button" value="下" name="B1" onclick="SwapOptions(document.all.D1,'down')"></p></body></html> 【实现用户自动登录】window.open改成window.location.replace后参数如何获取 关于JavaScript点击触发下拉框 firefox 下给动态input 控件追加onFocus事件问题 js 编码问题 一个form两个submit对应不同查询条件的问题 如何得知点击在指定区域外? 关于Javascript对象的一个问题 js的问题,急用,高分求救!!! 关于层的一个问题,在线等待!! 如何获得图片的地址?即src 在控件中如何将原来隐藏的控件通过点击button来显示出来 如何连接数据库?急~~~~~~~~~~~~~~~~~救命~~~~~~~~~~~~~~`
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script>
function SwapOptions(obj,direction)
{
var objIndex = obj.selectedIndex;
var swapIndex=direction=="up"?objIndex-1:objIndex+1;
if ((swapIndex==obj.length&&direction=="down")||(swapIndex==-1&&direction=="up")||swapIndex<0) return false;
obj.options[objIndex].swapNode(obj.options[swapIndex]);
}
</script>
</head><body><p><select size="7" name="D1" id="D1">
<option selected>一</option>
<option>二</option>
<option>三</option>
<option>四</option>
<option>五</option>
</select><input type="button" value="上" name="B1" onclick="SwapOptions(document.all.D1,'up')"><input type="button" value="下" name="B1" onclick="SwapOptions(document.all.D1,'down')"></p>
</body></html>