From a8b73c7c8c45d1184ea1e3e5ef57f34b1febf2da Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Thu, 2 Jun 2016 14:54:16 +0800 Subject: [PATCH] =?UTF-8?q?jeecg=20IE8=E4=BB=A5=E4=B8=8B=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=80=81=E7=9A=84=E9=A6=96=E9=A1=B5=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/plug-in/login/js/login.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/plug-in/login/js/login.js b/src/main/webapp/plug-in/login/js/login.js index 8977384a..c080eff9 100644 --- a/src/main/webapp/plug-in/login/js/login.js +++ b/src/main/webapp/plug-in/login/js/login.js @@ -1,5 +1,13 @@ $(document).ready(function() { + //author:scott---date:20160426---for:判断浏览器跳转兼容风格 + var navigatorName = "Microsoft Internet Explorer"; + if( navigator.appName == navigatorName ){ + alert("IE浏览器采用传统首页风格,更佳体验建议使用Chrome浏览器!") + setCookie("JEECGINDEXSTYLE","shortcut"); + }else{ + } + $("#userName").attr("nullmsg",pleaseinutusername); $("#userName").attr("title",username); @@ -9,6 +17,7 @@ $(document).ready(function() { $("#randCode").attr("nullmsg",pleaseinputvalidatecode); $("#randCode").attr("title",validatecode); + getCookie(); onfocus(); @@ -92,7 +101,11 @@ function submit() }); if (submit) { hideTop(); - loading(checking, 1); + try { + loading(checking, 1); + } catch (e) { + // TODO: handle exception + } setTimeout("unloading()", 1000); setTimeout("Login()", 1000); } @@ -312,4 +325,12 @@ function jrumble() { }); $('.inner').trigger('startRumble'); setTimeout('$(".inner").trigger("stopRumble")', 500); +} + +function setCookie(name,value) +{ +var Days = 30; +var exp = new Date(); +exp.setTime(exp.getTime() + Days*24*60*60*1000); +document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } \ No newline at end of file