<script language="javascript">
function onchange_kind1(value)
{
document.frames["frmcontent"].location.replace("kind.jsp?id="+value);
//document.frames[0].href="kind.jsp?id="+value;
//document.form1.kind.value = value;
}
</script>
<select name="kind1" id="kind1" onChange="onchange_kind1(this.value);">
<%
Vector myvector=null;
myvector=kind1info.selectInfor();
for(int i=0;i<myvector.size();i++)
{
kind1id=((kind1Unit)myvector.elementAt(i)).getID();
kindname1=((kind1Unit)myvector.elementAt(i)).getKindName1();
%>
<option value="<%=kind1id%>"><%=kindname1%></option>
<%
}//循环结束
%>
</select></td>
<td width="81%"><div id="divKind" name="divKind">
<select name="kind2" id="kind2">
</select>
</div>
<iframe id="frmcontent" name="frmcontent" width="400" height="40" src=""></iframe>
第二页面
<div id="divKind" name="divKind">
<select name="kind2" id="kind2" >
<%
Vector myvector=null;
myvector=kind2info.selectInfor(kind1id);
for(int i=0;i<myvector.size();i++)
{
kind2id=((kind2Unit)myvector.elementAt(i)).getID();
kindname2=((kind2Unit)myvector.elementAt(i)).getKindName2();
%>
<option value="<%=kind2id%>"><%=kindname2%></option>
<%
}//循环结束
%>
</select>
</div>
<script language="javascript">
function getItem()
{
//alert(document.form1.kind2.innerHTML);
//alert(parent.document.form1.kind2.innerHTML);
parent.document.all.divKind.innerHTML = document.all.divKind.innerHTML;
//alert(parent.document.form1.kind2.innerHTML);
//.innerText
}
getItem();
</script>
posted on 2006-09-04 17:11
周锐 阅读(215)
评论(0) 编辑 收藏 所属分类:
Jsp