jQuery+Bootstrap手机端支付宝金额充值表单页面代码

jQuery+Bootstrap手机端支付宝金额充值表单页面代码-精品资源网
jQuery+Bootstrap手机端支付宝金额充值表单页面代码
此内容为免费资源,请登录后查看
0
免费资源

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>

© 版权声明
THE END
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容