关于iframe在网页之间无法传递参数的问题 15
usercontrol.jsp里iframe连接searchuser.jsp...searchuser.jsp里iframe连接了searchuserback1.jsp....
usercontrol.jsp里iframe连接searchuser.jsp...searchuser.jsp里iframe连接了searchuserback1.jsp...在单独调用searchuser.jsp的时候...searchuserback1.jsp显示正常...在访问usercontrol.jsp...然后通过searchuser.jsp传递参数给searchuserback1.jsp...网页无法获取参数......
usercontrol.jsp部分代码:
<iframe scrolling="no" id="extend6" width="500" height=800 src="searchuser.jsp" frameborder='0' ></iframe>
searchuser.jsp部分代码:
<script>
$(function() {
$("#snick").click(function(){
var v1=$("#SearchNick").val();
$("#extend1",parent.document.body).attr("src","../myapp/searchuserback1.jsp?SearchNick="+v1);
});
});
</script>
<td width="170">
<label>
<input name="SearchNick" id="SearchNick" type="text" value="搜索昵称" onfocus="if(value==defaultValue){value='';this.style.color='#000'}" onblur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999"/>
</label> </td>
<td width="50">
<label>
<input type="button" name="snick" id="snick" value="搜索" />
</label> </td>
<iframe scrolling="no" id="extend1" width="500" height="800" src="../searchuserback1.jsp" frameborder='0' ></iframe>
searchuserback1.jsp部分代码:
String strSearchN=request.getParameter("SearchNick").trim(); 展开
usercontrol.jsp部分代码:
<iframe scrolling="no" id="extend6" width="500" height=800 src="searchuser.jsp" frameborder='0' ></iframe>
searchuser.jsp部分代码:
<script>
$(function() {
$("#snick").click(function(){
var v1=$("#SearchNick").val();
$("#extend1",parent.document.body).attr("src","../myapp/searchuserback1.jsp?SearchNick="+v1);
});
});
</script>
<td width="170">
<label>
<input name="SearchNick" id="SearchNick" type="text" value="搜索昵称" onfocus="if(value==defaultValue){value='';this.style.color='#000'}" onblur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999"/>
</label> </td>
<td width="50">
<label>
<input type="button" name="snick" id="snick" value="搜索" />
</label> </td>
<iframe scrolling="no" id="extend1" width="500" height="800" src="../searchuserback1.jsp" frameborder='0' ></iframe>
searchuserback1.jsp部分代码:
String strSearchN=request.getParameter("SearchNick").trim(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询