Jquery读取URL参数小例子
程序员文章站
2022-04-19 18:49:37
代码如下:
$(document).ready(function(){
function getQueryString(name) {
var reg = new Reg...
代码如下:
$(document).ready(function(){
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
if (getQueryString("SignUp") == 1)
{
$("#pLogon").css({ top: "auto", left: "auto", position: "absolute" });
$('#registerModal1').modal('show');
}
})