日期:2014-05-19  浏览次数:20910 次

如何在跳出框架的同时传参数
各位大哥,小弟最近碰到一个问题,要在跳出框架转向另一个新的页面时要向新的页面传递参数,不知道怎么传,   有人知道么?
谢谢!

------解决方案--------------------
<script language= "JavaScript " type= "text/JavaScript ">
function book(a,arrdt,leadt,rmty)
{
location= 'Book.aspx?htlcd= '+a+ '&arrdt= ' + arrdt + '&leadt= ' + leadt+ '&rmtyp= ' + rmty;
}
</script>
------解决方案--------------------
<script language= "JavaScript " type= "text/JavaScript ">
var num=123;
window.open( "index.aspx?num= "+num);
</script>

------解决方案--------------------
如果想跳出框架可以这样
top.location.href = "你的页面 ";

var para1 = "aaa ";
var para2 = "bbb ";
top.location.href = "default.aspx?para1= "+para1+ "&para2 "+para2;
------解决方案--------------------
top.location.href = "你的页面 ";
这样就行了!
------解决方案--------------------
能在cs文件中实现么,即使调用前台的javascript函数
----------》
输出一段js就可以了

Page.RegisterStartupScript( "ggg ", " <script> GotoPage(1); </script> ");
或者用Literal
string str;
str= " <script language= 'javascript '> ";
str+= "GotoPage(1) ";
str+= " </script> ";
Literal1.Text=str;