JS历理 根据来源跳转指定页面
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0; url=https://www.cnblogs.com/onestopweb">
<title>HTML直接跳转指定页面</title>
</head>
<body>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
//if (window.location.href.includes('123'))
if (document.referrer === '') {
document.writeln("<meta http-equiv=\'refresh\' content=\'0; url=https://www.cnblogs.com/onestopweb'\'>");
self.location.href='https://www.cnblogs.com/onestopweb';
} else {
document.writeln("<meta http-equiv=\'refresh\' content=\'0; url=https://www.cnblogs.com/onestopweb/p/18237996'\'>");
self.location.href='https://www.cnblogs.com/onestopweb/p/18237996';
}
</script>
<title>JS 根据来源跳转指定页面</title>
</head>
<body>
</body>
</html>
效果图:


浙公网安备 33010602011771号