怎么用iframe来解决此问题
假如一个表单中有三项,第一项为一个下拉框,其中选择下拉框的第一列时,第二个文本框的值只能在给定的数组里取值,第三个文本框的值为默认值.怎么实现 呀
我改了一个HTML文件有点长,大家看一下怎么实现呀,谢谢
<html>
<head>
<meta http-equiv= "content-type " content= "text/html;charset=gb2312 ">
<script language= "JavaScript " type= "text/JavaScript ">
var onecount;
onecount=0;
subcat = new Array();
subcat[0] = new Array( "aa ");
subcat[1]=new Array( "bb ")
onecount=2;
var User_code=document.form1.2.value;//页面所取
function check_user(id){
var User_type=id;//用户类型
if(User_type==a){
var JL_Dep_name= "有限公司 ";
document.all.3.value=JL_Dep_name;
return JL_Dep_name;
var i;
for(i=0;i <onecount;i++){
if (User_code==subcat[i])
break;
}
if(i> =onecount){
alert( "用户名不正确! ");
form1.2.focus();
return false;
}
}
return true;
}
}
</script>
</head>
<body >
<form name= 'form1 ' method= 'post ' onSubmit= "return check_form(); " action= "2.jsp ">
<table border= "0 " width= "100% " align= "center " cellpadding= "2 " cellspacing= "1 " bgcolor= "#A4B6D7 ">
<tr>
<td width= "30% ">
<select name= '1 ' style= "width:97% " onChange= "check_user(document.form1.1.options
[document.form1.1.selectedIndex].value) ">
<option> 请选择
</option>
<option value= 'a '>
监理方
</option>
<option value= 'b '>
建设方
</option>
<option value= 'c '>
承建方
</option>
</select>
</td>
<td width= "30% " align= 'left '