关于asp 与 js参数传递的问题
父页面 表单名字和 文本域的名字都含有变量 当我要父页面传递参数时表单名字 文本域的名字该怎么写?下面是简单的代码 请各位帮帮忙
父页面a.asp
<%
for formid=1 to 10
%>
<table width=100%>
<form name="form<%=i%>" method="post" action="a.asp">
<tr>
<td> 图片地址 </td>
<td > <input name="FilePath<%=FormID%>" size="45" id="Filepath"> <input value="上传图片" type="button" onclick="javascript:window.open(upload_form.asp?formid=<%=formid%>,上传图片,width=340,height=280)"> </td>
</tr>
</form>
<% next %>
</table>
子页面upload_form.asp
<%
formid=Request.QueryString("formid")
oldImageName="我该怎么办?"
%>
<script language="JavaScript">
<!--
/*我是这么写的!错的请教到底该怎么写表单和文本域呢 怎么加上变量?*/
window.opener.document.form"<%=formid%>".FilePath"<%=formid%>".value="<%=oldImageName%>";
window.close();
-->
</script>
晕!被楼上的误导出了!我刚才写的也是错的!这样写才是对的:
window.opener.document.form<%=formid%>.FilePath<%=formid%>.value=<%=oldImageName%>;
呵呵!不好意思!