备注 var url=window.location.href;//获取地址栏 url var index=url.indexOf('#');//获取#的位置 var paramVal=url.substr(index,url.length);//获取 # 后面所有字符串 html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8&quo…
添加一个js文件,代码如下 // * jQuery url get parameters function [获取URL的GET参数值] // *character_set UTF-8 // * author Jerry.li(lijian@dzs.mobi) // * version 1.2012.12.11.1400 // * Example // * <code> // * var GET = $.urlGet(); //获取URL的Get参数 // * var id = GET['id…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Typ…
// jQuery url get parameters function [获取URL的GET参数值] // <code> // var GET = $.urlGet(); //获取URL的Get参数 // var id = GET['id']; //取得id的值 // </code> // url get parameters // public // return array() (function($) { $.extend({ urlGet:function() { va…
方法: //获取url路径?号后面的参数值.function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(1); strs = str.split("&"); for(var i = 0; i <…
//获取url中ID的值function getParamByName(name, url) { var match = RegExp('[?&]' + name + '=([^&]*)').exec(url); return match && decodeURIComponent(match[1].replace(/\+/g, ' ').replace('#', '')); } var ID = getParamByName("memberid",…