如题
就是一个很简单的切换语言
点击,重新刷页面
切换语言后
相关代码
$('.setlang_from').mousemove(function(){ console.log($('.selectBox').eq(0)); $('.selectBox').addClass("show"); }).mouseout(function(){ $('.selectBox').removeClass("show"); }) $('.selectBox li').click(function(){ // console.log("dianji"); $('.setlang_content').html($(this).html()) $('.setlang_image').attr("src",'/static/images/'+$(this).attr("className")+'.png') // $('.selectBox').css('display','none') $.ajax({ type:"post", url:"/i18n/setlang", data:{setlang:$(this).attr('className')}, error:function(data){ console.log('change language fail') }, success:function(data){ window.location.reload(); //成功拿到数据 就刷新 } }); });
但是在IE10上面点击没反应,不刷新,有时候甚至点不动,没有任何报错
**最诡异的是
F12之后 开启开发者工具之后 又可以点击并且刷新了**
求解
可能是window.location.reload()的问题。
试试window.location.href=window.location.href
click结尾的});掉了,还有HTML/CSS最后也扔上来 IE10没反应是否有任何报错?