日期:2014-05-17  浏览次数:20725 次

ASP中 radio及框架传值问题
index.asp中部分内容如下:

strtplx=request( "tplx ")

<form   name= "frm "   action= " "   method= "post ">
<td> <input   type= "radio "   name= "tplx "   value= "1 "   onclick= "pic.location.reload(true); "> 图1 </td>

<td> <input   type= "radio "   name= "tplx "   value= "2 "   onclick= "pic.location.reload(true); "> 图2 </td>

<td> <input   type= "radio "   name= "tplx "   value= "3 "   onclick= "pic.location.reload(true); "> 图3 </td>
</form>


<iframe   name= "pic "   id= "pic "   src= "pic.asp?tplx= <%=strtplx%> "> '这个地方得不到值


在iframe里如何将strtplx的值得到并且传下去,请高手指点。谢谢,在线急等。。。


------解决方案--------------------
<td> <input type= "radio " name= "tplx " value= "1 "
onclick= "pic.location.href= 'pic.asp?tplx= ' + this.value; "> 图1 </td>
<td> <input type= "radio " name= "tplx " value= "2 "
onclick= "pic.location.href= 'pic.asp?tplx= ' + this.value; "> 图2 </td>
<td> <input type= "radio " name= "tplx " value= "3 "
onclick= "pic.location.href= 'pic.asp?tplx= ' + this.value; "> 图3 </td>
------解决方案--------------------
<td> <input type= "radio " name= "tplx " value= "1 "
onclick= "pic.location.href= 'pic.asp?tplx= ' + this.value; "> 图1 </td>
<td> <input type= "radio " name= "tplx " value= "2 "
onclick= "pic.location.href= 'pic.asp?tplx= ' + this.value; "> 图2 </td>
<td> <input type= "radio " name= "tplx " value= "3 "
onclick= "pic.location.href= 'pic.asp?tplx= ' + this.value; "> 图3 </td>

如楼上的,加上iframe里这样写: <iframe name= "pic " id= "pic " src= "pic.asp?tplx=1 "> 就行了,默认为1,以后每次都通过OPTION传值过去,再做处理