1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > bootstrap支付宝充值html jQuery+Bootstrap移动端支付宝金额充值表单页面网页特效

bootstrap支付宝充值html jQuery+Bootstrap移动端支付宝金额充值表单页面网页特效

时间:2020-07-13 13:08:36

相关推荐

bootstrap支付宝充值html jQuery+Bootstrap移动端支付宝金额充值表单页面网页特效

JavaScript代码部分

var $amountInput = $('[type="number"]');

var amount = '';

var $getId = $('[type="hidden"]');

var getparse=ParaMeter();

$getId.val(getparse.id);

$(".quick_amount p").off("click").on("click", function () {

amount = $(this).text();

if (!$(this).hasClass('active')) {

$(this).addClass('active').siblings().removeClass('active');

$amountInput.val(amount);

} else {

$(this).removeClass('active');

$amountInput.val('');

}

})

$amountInput.on('input propertychange', function () {

if ($(this).val() > 5000) {

$('#exampleModal').modal('show')

}

if($(this).val()!==$('.quick_amount p.active').text()){

$('.quick_amount p').removeClass('active');

}

})

$('#exampleModal').on('hidden.bs.modal', function (e) {

$amountInput.val(5000);

})

function ParaMeter()

{

var obj={};

var arr=location.href.substring(location.href.lastIndexOf('?')+1).split("&");

for(var i=0;i < arr.length;i++){

var aa=arr[i].split("=");

obj[aa[0]]=aa[1];

}

return obj;

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。