init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
33
Public/js/getparam.js
可执行文件
33
Public/js/getparam.js
可执行文件
@@ -0,0 +1,33 @@
|
||||
;(function ($) {
|
||||
$.extend({
|
||||
//1、取值使用 $.Request("name")
|
||||
Request: function (name) {
|
||||
var sValue = location.search.match(
|
||||
new RegExp('[?&]' + name + '=([^&]*)(&?)', 'i')
|
||||
)
|
||||
//decodeURIComponent解码
|
||||
return sValue
|
||||
? decodeURIComponent(sValue[1])
|
||||
: decodeURIComponent(sValue)
|
||||
},
|
||||
//2、给url加参数 $.UrlUpdateParams(url, "add", 11111);
|
||||
UrlUpdateParams: function (url, name, value) {
|
||||
var r = url
|
||||
if (r != null && r != 'undefined' && r != '') {
|
||||
value = encodeURIComponent(value)
|
||||
var reg = new RegExp('(^|)' + name + '=([^&]*)(|$)')
|
||||
var tmp = name + '=' + value
|
||||
if (url.match(reg) != null) {
|
||||
r = url.replace(eval(reg), tmp)
|
||||
} else {
|
||||
if (url.match('[?]')) {
|
||||
r = url + '&' + tmp
|
||||
} else {
|
||||
r = url + '?' + tmp
|
||||
}
|
||||
}
|
||||
}
|
||||
return r
|
||||
},
|
||||
})
|
||||
})(jQuery)
|
||||
在新工单中引用
屏蔽一个用户