锘縱ar isAgree = false; function showDetail(par, flag) { if (flag === 0) { $(".details").hide(); $(".introduce").show(); $(par).hide(); $(par).next().show(); } else { $(par).hide(); $(par).prev().show(); } } function agreeProtocol() { var length = $('.agreeProtocol:checked').length; if (length === 0) { $('.submit-btn').hide(); $('.disable-submit-btn').show(); $('.sp-checkbox').removeClass('checked'); } else { $('.disable-submit-btn').hide(); $('.submit-btn').show(); $('.sp-checkbox').addClass('checked'); } } function changeDialog(value) { if (value) { $('.protocol-dialog').show(); $('body,html').css({ 'overflow': 'hidden' }); } else { $('.protocol-dialog').hide(); $('body,html').css({ 'overflow': 'visible' }); } } function readAndAgree() { var length = $('.agreeProtocol:checked').length; changeDialog(false); if (length == 0) { $('.agreeProtocol').prop('checked', true); $('.disable-submit-btn').hide(); $('.submit-btn').show(); $('.sp-checkbox').addClass('checked'); } } function stop() { event.preventDefault(); event.stopPropagation(); return false; } (function () { // 鍒濆鍖 var currentIndex = 0; var currentTab = $('.tabs .item').get(currentIndex); var currentContent = $('.tab-content').get(currentIndex); $(currentContent).css('display', 'block'); $(currentTab).addClass('active'); // 鐐瑰嚮浜嬩欢 $('.tabs').click(function(e) { if (e.target === currentTab) return; // 娓呴櫎 $(currentTab).removeClass('active'); $(currentContent).css('display', 'none'); // 娣诲姞 currentTab = $(e.target).addClass('active'); currentContent = $('.tab-content').get($(e.target).attr('current')); $(currentContent).css('display', 'block'); }); })(); function imgCodes() { var xmlhttp; xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "/get-captcha-image", true); xmlhttp.responseType = "blob"; xmlhttp.onload = function () { console.log(this); if (this.status == 200) { var blob = this.response; var img = document.getElementById("valiCode"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); }; img.src = window.URL.createObjectURL(blob); } } xmlhttp.send(); }