var str = '<style type="text/css">* html,* html body{background-image:url(about:blank);background-attachment:fixed;}html{overflow-x:hidden;}.ie6 { position: absolute; left: 0; top: 0; z-index: 9999; width: 1920px; height: 1000px; background-image: url(http://www.ecmoban.com/content/themes/ecmoban2014/images/bg-ie6.png); background-repeat: repeat; }.popup-ie6 { width: 820px; background-color:#fff; border: 1px solid #F4F5F6; height:450px; position:absolute; margin:200px 0 0 -410px; left:50%; top:0; z-index:10000; }.popup-ie6 h2 { margin-top: 35px; margin-left: 40px; }.popup-ie6 h4 { margin-top: 25px; margin-left: 40px; color: #FF8585; }.popup-ie6 ul.browser { width: 780px; height: 220px; margin-left: 30px; margin-top: 45px; }.popup-ie6 ul.browser li { float: left; width: 150px; text-align: center; }.popup-ie6 ul.browser li img { margin-bottom: 20px; }.popup-ie6 ul.browser li span,.popup-ie6 ul.browser li strong { display: block; margin-bottom: 15px; text-align: center; }.popup-ie6 ul.browser li span a { font-size: 16px; color: #858585; }.popup-ie6 ul.browser li strong a { font-size: 18px; font-weight: normal; color: #333; }.popup-ie6 ul.browser li a:hover { color: #FF8585; text-decoration: none; }.can-download { height: 71px; background-color: #EDEDED; border-top: 1px dotted #a5a5a5; }.can-download span { float: left; margin-left: 40px; margin-top: 25px; font-size: 18px; }.can-download .app { float: left; width: 230px; height: 30px; margin-top: 25px; background-image: url(http://www.ecmoban.com/content/themes/ecmoban2014/images/ie6-app.png); background-repeat: no-repeat; }.can-download a { float: left; width: 100px; height: 30px; margin-right: 10px; text-indent: -9999px; }.can-download a:hover,.can-download a:active,.can-download a:visited { outline: none; }.can-download a.app-store { background-position: 0 0; }.can-download a.app-android { display: block; background-position: 0 -33px; }.can-download a:hover { opacity: 0.7; filter: alpha(opacity=70); }</style><div class="ie6"><div class="popup-ie6"><h2>很抱歉，您目前使用的浏览器无法正常浏览我们的页面！</h2><h4>为了呈现我们官网最完美的状态，请您下载以下浏览器的最新版本</h4><ul class="browser"><li><a target="_blank" href="http://www.firefox.com.cn/"><img src="http://www.ecmoban.com/content/themes/ecmoban2014/images/browser-firefox.png" alt="火狐浏览器"></a><span><a target="_blank" href="http://www.firefox.com.cn/">Firefox</a></span><strong><a target="_blank" href="http://www.firefox.com.cn/">火狐浏览器</a></strong></li><li><a target="_blank" href="http://www.baidu.com/s?wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8&ie=utf-8&f=8&rsv_bp=1&tn=monline_5_dg&bs=%E8%B0%B7%E6%AD%8C"><img src="http://www.ecmoban.com/content/themes/ecmoban2014/images/browser-chrome.png" alt="谷歌浏览器"></a><span><a target="_blank" href="http://www.baidu.com/s?wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8&ie=utf-8&f=8&rsv_bp=1&tn=monline_5_dg&bs=%E8%B0%B7%E6%AD%8C">Chrome</a></span><strong><a target="_blank" href="http://www.baidu.com/s?wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8&ie=utf-8&f=8&rsv_bp=1&tn=monline_5_dg&bs=%E8%B0%B7%E6%AD%8C">谷歌浏览器</a></strong></li><li><a target="_blank" href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie"><img src="http://www.ecmoban.com/content/themes/ecmoban2014/images/browser-ie.png" alt="IE7以上浏览器"></a><span><a target="_blank" href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie">IE</a></span><strong><a target="_blank" href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie">IE7以上浏览器</a></strong></li><li><a target="_blank" href="http://support.apple.com/kb/DL1531"><img src="http://www.ecmoban.com/content/themes/ecmoban2014/images/browser-safari.png" alt="Safari浏览器"></a><span><a target="_blank" href="http://support.apple.com/kb/DL1531">Safari</a></span><strong><a target="_blank" href="http://support.apple.com/kb/DL1531">Safari浏览器</a></strong></li><li><a target="_blank" href="http://www.opera.com/zh-cn"><img src="http://www.ecmoban.com/content/themes/ecmoban2014/images/browser-opera.png" alt="Opera浏览器"></a><span><a target="_blank" href="http://www.opera.com/zh-cn">Opera</a></span><strong><a target="_blank" href="http://www.opera.com/zh-cn">Opera浏览器</a></strong></li></ul><div class="can-download"><span>您也可以通过下载手机端来访问我们的网站：</span><div class="app"><a class="app-store" href="http://itunes.apple.com/cn/app/ecshop-mo-ban-tang/id773051406?ls=1&mt=8" target="_blank">app-store</a><a class="app-android" href="http://download.ecmoban.com/app/ecmoban.apk" target="_blank">app-android</a></div></div></div></div>';//加载字符串

//加载字符串
$("body").append(str);
// 效果
    void function(){
        var na=navigator.userAgent;
        var fn=function(){
            var h=$(document).height(),w=$(document).width();
            $(".ie6").css({display:"block",height:h,width:w});
            $(".popup-ie6").css({left:50+"%"});
        }
        if(/msie 6/i.test(na)){
            fn();
            $(window).resize(function(){
                fn();
            });
        }
    }()
    $(window).scroll(function(){
        $(window).scrollTop(0);
    });
