javascript 獲取網(wǎng)頁(yè)參數(shù)系統(tǒng)
更新時(shí)間:2008年07月19日 13:19:11 作者:
用處比較多,適合在當(dāng)前網(wǎng)頁(yè)打開(kāi)別的網(wǎng)站的內(nèi)容
<SCRIPT LANGUAGE="JavaScript">
<!--
function get_url()
{
var src = window.location.href;
var I = src.substr(src.indexOf("?u=") + 3).length;
var T = src.indexOf("?u=");
//alert(src);
if (0 >= T) return "";
if (I == src.length) return -1;
var url = src.substr(src.indexOf("?u=") + 3);
//alert(url);
return url;
}
function go(url) {
//alert(url);
document.write('<html>');
document.write('<head>');
document.write('<title>chabaoo.cn - ' + url + '</title>');
document.write('<meta http-equiv="Content-Type" content="text/html; charset=gb2312">');
document.write('</head>');
document.write('<frameset rows="30,*" frameborder="NO" border="0" frameborder="0" framespacing="0"> ');
document.write(' <frame scrolling="NO" noresize src="http://img.jb51.net/api/tuijie/tuijie.htm?u=' + url + '" >');
document.write(' <frame name="chabaoo.cn" src="' + url + '">');
document.write('</frameset>');
document.write('</html>');
}
go(get_url());
//-->
self.status="jb51.net";
</SCRIPT>
<!--
function get_url()
{
var src = window.location.href;
var I = src.substr(src.indexOf("?u=") + 3).length;
var T = src.indexOf("?u=");
//alert(src);
if (0 >= T) return "";
if (I == src.length) return -1;
var url = src.substr(src.indexOf("?u=") + 3);
//alert(url);
return url;
}
function go(url) {
//alert(url);
document.write('<html>');
document.write('<head>');
document.write('<title>chabaoo.cn - ' + url + '</title>');
document.write('<meta http-equiv="Content-Type" content="text/html; charset=gb2312">');
document.write('</head>');
document.write('<frameset rows="30,*" frameborder="NO" border="0" frameborder="0" framespacing="0"> ');
document.write(' <frame scrolling="NO" noresize src="http://img.jb51.net/api/tuijie/tuijie.htm?u=' + url + '" >');
document.write(' <frame name="chabaoo.cn" src="' + url + '">');
document.write('</frameset>');
document.write('</html>');
}
go(get_url());
//-->
self.status="jb51.net";
</SCRIPT>
您可能感興趣的文章:
- javascript[js]獲取url參數(shù)的代碼
- Javascript 獲取鏈接(url)參數(shù)的方法
- javascript 獲取url參數(shù)的正則表達(dá)式(用來(lái)獲取某個(gè)參數(shù)值)
- 在JavaScript中獲取請(qǐng)求的URL參數(shù)
- Javascript獲取HTML靜態(tài)頁(yè)面參數(shù)傳遞值示例
- javascript/jquery獲取地址欄url參數(shù)的方法
- javascript獲取函數(shù)名稱、函數(shù)參數(shù)、對(duì)象屬性名稱的代碼實(shí)例
- 使用JavaScript獲取地址欄參數(shù)的方法
相關(guān)文章
微信小程序ajax實(shí)現(xiàn)請(qǐng)求服務(wù)器數(shù)據(jù)及模版遍歷數(shù)據(jù)功能示例
這篇文章主要介紹了微信小程序ajax實(shí)現(xiàn)請(qǐng)求服務(wù)器數(shù)據(jù)及模版遍歷數(shù)據(jù)功能,結(jié)合實(shí)例形式分析了微信小程序ajax調(diào)用及模板wx:for循環(huán)列表渲染相關(guān)操作技巧,需要的朋友可以參考下2017-12-12使用JavaScript實(shí)現(xiàn)頁(yè)面局部更新的方法總結(jié)
在JavaScript中,Ajax(Asynchronous JavaScript and XML)是一種用于在后臺(tái)與服務(wù)器進(jìn)行異步通信的技術(shù),本文給大家介紹了使用JavaScript實(shí)現(xiàn)頁(yè)面局部更新的三種方法,文中通過(guò)代碼示例給大家介紹的非常詳細(xì),需要的朋友可以參考下2023-12-12webpack與SPA實(shí)踐之管理CSS等資源的方法
本篇文章主要介紹了webpack與SPA實(shí)踐之管理CSS等資源的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-12-12js實(shí)現(xiàn)城市級(jí)聯(lián)菜單的2種方法
這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)城市級(jí)聯(lián)菜單的2種方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-06-06JavaScript遍歷json對(duì)象數(shù)據(jù)的方法
這篇文章介紹了JavaScript遍歷json對(duì)象數(shù)據(jù)的方法,文中通過(guò)示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-04-04JavaScript實(shí)現(xiàn)文本目標(biāo)字符替換和一鍵全部替換
這篇文章主要介紹了JavaScript實(shí)現(xiàn)文本目標(biāo)字符替換和一鍵全部替換,文章圍繞主題展開(kāi)詳細(xì)的內(nèi)容介紹,具有一定的參考價(jià)值,需要的小伙伴可以參考一下2022-06-06