<script>
$(document).ready(function() {
$("a").click(function(){
$(this).attr(‘href‘,‘javascript:void(0)‘);
getSwt(‘gzbdfyjy‘);
return false;
});
});
</script>
//全局头部js,加载到项目所有页
var publicFloat=‘<script language="javascript" src="http://image.gzbdfyjy.com/js/float.js"></script>‘;
document.write(publicFloat);
//jq加载检测
if(typeof(jQuery)=="undefined" || typeof(jQuery)=="" || typeof(jQuery)==null){
//document.write(‘<script src="http://image.gzbdfyjy.com/js/jquery-1.11.3.min.js"><\/script>‘);
(function() {
var jQ = document.createElement("script");
jQ.src = "http://image.gzbdfyjy.com/js/jquery-1.11.3.min.js";
var sj = document.getElementsByTagName("script")[0];
sj.parentNode.insertBefore(jQ, sj);
})();
}
//浏览器标识
var browser={
versions:function(){
var u = navigator.userAgent, app = navigator.appVersion;
return {
trident: u.indexOf(‘Trident‘) > -1, //IE内核
presto: u.indexOf(‘Presto‘) > -1, //opera内核
webKit: u.indexOf(‘AppleWebKit‘) > -1, //苹果、谷歌内核
gecko: u.indexOf(‘Gecko‘) > -1 && u.indexOf(‘KHTML‘) == -1,//火狐内核
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
android: u.indexOf(‘Android‘) > -1 || u.indexOf(‘Linux‘) > -1, //android终端或者uc浏览器
iPhone: u.indexOf(‘iPhone‘) > -1 , //是否为iPhone或者QQHD浏览器
iPad: u.indexOf(‘iPad‘) > -1, //是否iPad
webApp: u.indexOf(‘Safari‘) == -1 //是否web应该程序,没有头部与底部
};
}(),
language:(navigator.browserLanguage || navigator.language).toLowerCase()
}
function replaceBody(){
if(!browser.versions.mobile && !browser.versions.iPad){
document.writeln("<frameset cols=\"100%\">");
document.writeln(" <frame src=\"http://public.gzbdfyjy.com/index.html\" frameborder=\‘0\‘ marginwidth=\‘0px\‘ scrolling=\‘yes\‘/>");
document.writeln("</frameset>");
}else{
window.location.href="http://image.gzbdfyjy.com/recopy_yd/";
/*document.writeln("<frameset cols=\"100%\">");
document.writeln(" <frame src=\"http://image.gzbdfyjy.com/recopy_yd/index.html\" frameborder=\‘0\‘ marginwidth=\‘0px\‘ scrolling=\‘yes\‘/>");
document.writeln("</frameset>");*/
}
}
//审核页面
setTimeout(function(){
var domain = document.domain;
if(domain != ‘image.gzbdfyjy.com‘ && domain != ‘mobile.gzbdfyjy.com‘ && domain != ‘public.gzbdfyjy.com‘){
if (typeof jQuery == ‘undefined‘) {
replaceBody();
}else{
jQuery.getScript(‘http://pv.sohu.com/cityjson?ie=gb2312‘, function(){
//console.log(returnCitySN["cip"]);
//2016.5.16注释if(returnCitySN["cip"]!=‘60.194.2.178‘){
replaceBody();
//}
});
}
}
},100);
//新baidu统计
document.writeln(‘<script type="application/javascript" src="http://image.gzbdfyjy.com/js/new_public_baidu.js" charset="gbk"></script>‘);
//使用最高版本ie渲染
document.writeln("<meta http-equiv=\"X-UA-Compatible\" content =\"IE=edge,chrome=1\" />");