各位兄弟指教一下我得问题 我主要是想选择grade下拉列表时name下拉列表的值也相应发生改变,但不知怎么实现,主要是javascript脚本函数的问题,望赐教 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><HEAD><title>例子</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><SCRIPT LANGUAGE="JavaScript">var meng1Array = new Array("('选择51.net栏目内容','',true,true)","('学习 XML')","('学习 Javascript')","('学习 PHP')");var mengArray = new Array("('选择Myrice.com栏目内容','',true,true)","('学习 Flash')","('学习 Dreamweaver Ultradev')","('学习 Java')");var meng2Array = new Array("('选择163.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></head><body bgcolor="#0099FF"><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://egirl.51.net<option value=meng2>http://go.163.com/~colorweb</select></td> <td> <select name="mxhweb" onChange="window.open('http://elove.heha.net')" class="unnamed1"> <option value=''>☆ 请选择上面的选项 ☆</option> </select> </td> </tr> </table> </form></center></body></html> 怎样将jsp中的数组传递给javascript函数,即在javascript中怎样调用jsp中的数组,还有一个问题是在javascript函数中怎样调用jsp中的变量的值,有哪位仁兄知道可否告诉我,非常感激 怎样将jsp中的数组传递给javascript函数,即在javascript中怎样调用jsp中的数组,还有一个问题是在javascript函数中怎样调用jsp中的变量的值,有哪位仁兄知道可否告诉我,非常感激 一个实际的面试题 怎样用gzip来压缩jsp? 有关于FreeMarker 取出最新的几条数据? 如何只显示数据中的前 N 个字呢??? ireport 问题 简单问题,郁闷中!问题解决就结贴,在线等!12点前结帖 实际项目中,关于servlet的跳转问题。 编写一JSP网页,(分不够可以在加,测试通过,马上给分) 关于登录的问题 Jive 一个公开源码的java FORUM程序 从oracle8中读取数据的问题!
<HEAD>
<title>例子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
var meng1Array = new Array("('选择51.net栏目内容','',true,true)",
"('学习 XML')",
"('学习 Javascript')",
"('学习 PHP')");
var mengArray = new Array("('选择Myrice.com栏目内容','',true,true)",
"('学习 Flash')",
"('学习 Dreamweaver Ultradev')",
"('学习 Java')");
var meng2Array = new Array("('选择163.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>
</head>
<body bgcolor="#0099FF"><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://egirl.51.net
<option value=meng2>http://go.163.com/~colorweb
</select></td>
<td>
<select name="mxhweb" onChange="window.open('http://elove.heha.net')" class="unnamed1">
<option value=''>☆ 请选择上面的选项 ☆</option>
</select>
</td>
</tr>
</table>
</form>
</center>
</body></html>