本帖最后由 CrLf 于 2012-6-30 11:09 编辑
- var url="http://这里是网站.html?from=4"
- url+="&encrypt="+getUrlParams()["encrypt"];
- jQuery("#t_frame").attr("src",url);
-
-
- function getUrlParams(){
- var params=new Object();
- var url = location.href+"";
- if(url==null) return params;
- var position=url.indexOf("?");
- if(position<0) return params;
- url = url.substring(position+1);
- var paramString =url.split("&");
- for (i=0,len=paramString.length; i<len; i++){
- var j=paramString[i].indexOf("=");
- if(j>0&&j<paramString[i].length-1){
- var paramName=paramString[i].substring(0,j);
- params[paramName]=paramString[i].substring(j+1);
- }
- }
- return params;
- }
复制代码 我的目的就是想知道 encrypt 是怎么获取的??? |