<html>
<HEAD>
<title>例子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><SCRIPT LANGUAGE="JavaScript">
var meng1Array = new Array("('选择Heha.net栏目内容','',true,true)",
"('学习 XML')",
"('学习 Javascript')",
"('学习 PHP')");
var mengArray = new Array("('选择Myrice.com栏目内容','',true,true)",
"('学习 Flash')",
"('学习 Dreamweaver Ultradev')",
"('学习 Java')");
var meng2Array = new Array("('选择China.com栏目内容','',true,true)",
"('查找歌词')",
"('其他')");function populatemxhweb(inForm,selected) {
var selectedArray = eval(selected + "Array");
while (selectedArray.length < inForm.mxhweb.options.length) {
inForm.mxhweb.options[(inForm.mxhweb.options.length - 1)] = null;
}
for (var i=0; i < selectedArray.length; i++) {
eval("inForm.mxhweb.options[i]=" + "new Option" + selectedArray[i]);
}if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0);
}}
//以下不影响}</script>
<link rel="stylesheet" href="../css/css.css" type="text/css">
</head><body topmargin="0" leftmargin="0" marginweight="0" marginheight="0" bgcolor="#0099FF" oncontextmenu="return false;"><p> </p>
<font color="#000066">说明:适用于IE4,IE5.5,IE5,NS4+,NS6。早期版本的IE5.0可能无法工作。</font>
<center>
<form name="globe">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<select onChange="populatemxhweb(document.globe,this.options[selectedIndex].value)">
<option>请选择
<option value="meng">http://lucky.myrice.com
<option value="meng1">http://go.163.com/colorweb
<option value="meng2">http://egirl.51.net
</select>
</td>
<td>
<select name="mxhweb" onChange="window.open('http://egirl.51.net')">
<option value=''>☆ 请选择上面的选项 ☆</option>
</select>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<input type="button" value="关闭本页" onclick="window.close()">
</form>
</center>
</body>
</html>
<HEAD>
<title>例子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><SCRIPT LANGUAGE="JavaScript">
var meng1Array = new Array("('选择Heha.net栏目内容','',true,true)",
"('学习 XML')",
"('学习 Javascript')",
"('学习 PHP')");
var mengArray = new Array("('选择Myrice.com栏目内容','',true,true)",
"('学习 Flash')",
"('学习 Dreamweaver Ultradev')",
"('学习 Java')");
var meng2Array = new Array("('选择China.com栏目内容','',true,true)",
"('查找歌词')",
"('其他')");function populatemxhweb(inForm,selected) {
var selectedArray = eval(selected + "Array");
while (selectedArray.length < inForm.mxhweb.options.length) {
inForm.mxhweb.options[(inForm.mxhweb.options.length - 1)] = null;
}
for (var i=0; i < selectedArray.length; i++) {
eval("inForm.mxhweb.options[i]=" + "new Option" + selectedArray[i]);
}if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0);
}}
//以下不影响}</script>
<link rel="stylesheet" href="../css/css.css" type="text/css">
</head><body topmargin="0" leftmargin="0" marginweight="0" marginheight="0" bgcolor="#0099FF" oncontextmenu="return false;"><p> </p>
<font color="#000066">说明:适用于IE4,IE5.5,IE5,NS4+,NS6。早期版本的IE5.0可能无法工作。</font>
<center>
<form name="globe">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<select onChange="populatemxhweb(document.globe,this.options[selectedIndex].value)">
<option>请选择
<option value="meng">http://lucky.myrice.com
<option value="meng1">http://go.163.com/colorweb
<option value="meng2">http://egirl.51.net
</select>
</td>
<td>
<select name="mxhweb" onChange="window.open('http://egirl.51.net')">
<option value=''>☆ 请选择上面的选项 ☆</option>
</select>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<input type="button" value="关闭本页" onclick="window.close()">
</form>
</center>
</body>
</html>
解决方案 »
- 关于ajaxupload.3.6.JS使用异常
- 传值为对象的时候,如何传?急!急急!急急急!
- IE中setAttribute的问题
- 为什么这一段在firefox里不弹出alert?
- 请问如何在js中表示16进制字符串
- 怎样把下拉框改为可编辑?
- 如何只让一个城市访问网站(最好精确到区),并且在某个时间段才能访问 不是这个城市的弹出消息,您不在服务区!(就是限制时间和地点访
- 主页面的高度如何根据其中一个frame的高度自动增长或缩短???
- 如何获取表单的内容,比如想获取文本框的内容,给代码谢谢!
- 求指点。敢接万分。看段代码什么意思
- 各位好心的哥哥姐姐有谁知道在netscape的环境下,能使textarea的属性变成readonly的吗?或是在<textarea>标签里能有接受事件的办法吗(ne
- 如何将一个变量转换为 int整数类型?
<head>
<script language="JavaScript">
<!--
function addSrcToDestList() {
destList = window.document.forms[0].destList;
srcList = window.document.forms[0].srcList;
var len = destList.length;
for(var i = 0; i < srcList.length; i++) {
if ((srcList.options[i] != null) && (srcList.options[i].selected)) {var found = false;
for(var count = 0; count < len; count++) {
if (destList.options[count] != null) {
if (srcList.options[i].text == destList.options[count].text) {
found = true;
break;
}
}
}
if (found != true) {
destList.options[len] = new Option(srcList.options[i].text);
len++;
}
}
}
}function deleteFromDestList() {
var destList = window.document.forms[0].destList;
var len = destList.options.length;
for(var i = (len-1); i >= 0; i--) {
if ((destList.options[i] != null) && (destList.options[i].selected == true)) {
destList.options[i] = null;
}
}
}
// -->
</SCRIPT>
</head>
<body>
<center>
<form method="POST">
<table bgcolor="#FFFFCC"><tr>
<td bgcolor="#FFFFCC" width="85">
<select size="6" name="srcList" multiple>
<option value="1">Item 1
<option value="2">Item 2
<option value="3">Item 3
<option value="4">Item 4
<option value="5">Item 5
<option value="6">Item 6
</select>
</td>
<td bgcolor="#FFFFCC" width="74" align="center">
<input type="button" value=" 增加到右边 " onClick="javascript:addSrcToDestList()">
<br><br>
<input type="button" value=" 从右边删除 " onclick="javascript:deleteFromDestList();">
</td>
<td bgcolor="#FFFFCC" width="69">
<select size="6" name="destList" multiple>
</select>
</td>
</tr>
</table>
</form>
</body>
</html>
var f=document.all.select1
var t=document.all.select2
for(i=f.length-1;i>=0;i--)
if(f.options[i].selected){
var n=t.length++
t.options[n].text=f.options[i].text;
t.options[n].value=f.options[i].value;
f.remove(i);//删除原来的,是否删除根据你的需要
}
}