⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 可用按钮移动选择的连接.txt

📁 JavaScript特效(新)这里有许多的JAVA特效.供学者参考
💻 TXT
字号:
<html>
<head>
	<title>Select Box Reorder</title>
	<script language="JavaScript1.1">

function headerup() {

master = document.prefs.h_order.selectedIndex;
if (master < 1) {return;};
mastertext = document.prefs.h_order.options[master].text;
mastervalue = document.prefs.h_order.options[master].value;
//item to be displaced
slave = master - 1;
slavetext = document.prefs.h_order.options[slave].text;
slavevalue = document.prefs.h_order.options[slave].value;
//selected item in new position
document.prefs.h_order.options[slave].text = mastertext;
document.prefs.h_order.options[slave].value = mastervalue;
//displaced item in vacated position
document.prefs.h_order.options[master].text = slavetext;
document.prefs.h_order.options[master].value = slavevalue;
//highlight the selected item in its new position
document.prefs.h_order.selectedIndex = slave;

}
//move the choice down in the order
function headerdown() {
master = document.prefs.h_order.selectedIndex;
if (master +1 == document.prefs.h_order.length) {return;};
mastertext = document.prefs.h_order.options[master].text;
mastervalue = document.prefs.h_order.options[master].value;
//item to be displaced
slave = master + 1;
slavetext = document.prefs.h_order.options[slave].text;
slavevalue = document.prefs.h_order.options[slave].value;
//selected item in new position
document.prefs.h_order.options[slave].text = mastertext;
document.prefs.h_order.options[slave].value = mastervalue;
//displaced item in vacated position
document.prefs.h_order.options[master].text = slavetext;
document.prefs.h_order.options[master].value = slavevalue;
//highlight the selected item in its new position
document.prefs.h_order.selectedIndex = slave;

}


</script>
</head>


<body>
<form name="prefs" action="nothing" method="post">
<table border="0"><tr>
<td align="left" valign="top" bgcolor="#FFFFCC" width="200">
			<table border="0"><tr><td>
			用按扭移动表单选项:<br>
              <select name="h_order" size="6">
                <option value="R1" selected>item  1</option>
                <option value="R2">item  2</option>
                <option value="R3">item  3</option>
                <option value="R4">item  4</option>
                <option value="R5">item  5</option>
               <option value="R6">item  6</option>
              </select></td><td align="center" valign="middle">
			  <input type="button" name="updchoice" value="上移"  onclick="headerup();"><br>
			  <input type="button" name="downdchoice" value="下移"  onclick="headerdown();"></tr></table>
            </td>
</tr></table></form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -