jQuery+Bootstrap手机端支付宝金额充值表单页面代码
这是一款基于jQuery+Bootstrap实现的手机移动端支付宝金额充值表单页面代码,主要看选择充值金额的效果。
在线预览
资源均来自第三方,谨慎下载,前往第三方网站下载
js代码
<script src="./js/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script>
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;
}
</script>
在线预览
资源均来自第三方,谨慎下载,前往第三方网站下载
本站所有文章、数据、图片均来自互联网,一切版权均归源网站或源作者所有。
如果侵犯了你的权益请来信告知我们删除。邮箱:737597453@qq.com


