2012-11-22 34 views

回答

0

javascript代碼:

document.location = 
    document.location.href.split('?')[0].replace('pageB','pageC') + 
    document.location.href.split('?')[1]; 

document.location = 
    document.location.host + '/pathToPage/pageC.htm' +     
    document.search; 
0

可以使用ASP.NET

例如你有一個鏈接參數在你的URL創建一個動態鏈接控件

// http://localhost/home.aspx?link=http://www.google.com 

,然後請求您的參數

if (Request.QueryString["link"] != null){  
string myhyperlink = Request.QueryString["link"]; 

現在,你需要一個超鏈接控件添加到您的網頁

HyperLink hyp = new HyperLink(); 
    hyp.ID = "hypABD"; 
    hyp.NavigateUrl = myhyperlink; 
    Page.Controls.Add(hyp); 

希望這有助於

相關問題