<script>
$(document).ready(function(){
$("#btnConfirm").click(function(){
var value=$("input[name='paymethod']:checked").val();
if(value=="0"){
$("#alipay-info").modal("show");
}
else if(value=="1"){
$("#wechat-pay-info").modal("show");
}
else if(value=="2"){
location.href="deposit-success.html?method=2";
}
});
$.getUrlParam = function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
var error = $.getUrlParam('error');
if(error!="true"){
$("#error-info").hide();
$
}
});
</script>
【JS-01】正则表达式获取url的参数值
最新推荐文章于 2024-06-04 19:55:06 发布