$(function(){ location.hash.split('#').pop()=='yzmError' && swal('验证码不正确,请重新登录'),location.hash='' || location.hash.split('#').pop()=='loginError' && swal('密码错误或者是账号不存在'),location.hash=''; }); function tanchu(chaunti) { guanbi(); $("body").append("
").addClass("ovn"); $(chaunti).show(0, function() { $(chaunti).css({ "top": ($(window).height() - $(chaunti).height()) / 2, "left": ($(window).width() - $(chaunti).width()) / 2 }); }); }; function guanbi() { $(".tanchu,.denglu_tc,.qdhb").hide(0, function() { $(".baibg").remove(); $("body").removeClass("ovn"); }); }; $(function() { $(".js-guanbi,.baibg,.icon-close,.qdhb-close").on("click", function() { guanbi() }); }); $(function() { $(".js-zcrs").each(function() { var datanum = eval('(' + $(this).attr("data") + ')'); var x = parseInt(datanum.max); var y = parseInt(datanum.min); var rand = parseInt(Math.random() * (x - y + 1) + y); $(this).html(rand); var thisdom = $(this); setInterval(function() { var t = -18; var b = 19; var numadd = parseInt(Math.random() * (t - b + 1) + b); $(thisdom).html(parseInt($(thisdom).html()) + numadd); }, 4000) }) }); //收藏本站 function AddFavorite(title, url) { try { window.external.addFavorite(url, title); } catch (e) { try { window.sidebar.addPanel(title, url, ""); } catch (e) { alert(title+"。\n\n加入收藏失败,请进入新网站后使用Ctrl+D进行添加"); } } } // 弹出登录 $(function() { var index = window.location.search; var t = index.replace('?tc', ''); if (t == "login") { tanchu("#denglu1") } });