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

关于iframe怎样截取页面地址的问题?请教各位大侠
比如从页面a   连接到temp页面  
有这样一个地址a/b/c/temp.aspx?id=50$name=60

在temp页面上有一个iframe   我想在temp页面上截取字符串temp.aspx?id=50$name=60
把它传递给iframe的src中去
请问该怎么做呢?
谢谢

------解决方案--------------------
var sp=window.location.pathname.split( "/ ");
document.all.iframeid.src=sp[sp.length-1]+window.location.search
------解决方案--------------------
iframeId.src
------解决方案--------------------
string s=request.RawUrl.substring(request.rawurl.lastindexof( "/ "));

this.iframe.src=s;

iframe要设置为服务器控件