相关疑难解决方法(0)

如何重定向到其他网页?

如何使用jQuery或纯JavaScript将用户从一个页面重定向到另一个页面?

javascript jquery redirect

7725
推荐指数
58
解决办法
596万
查看次数

使用Google Analytics进行Javascript重定向

我需要帮助确定如何在包含Google Analytics代码的同时成功重定向.

该重定向文件的代码:

<head>
<script type="text/javascript">
function delayedRedirect(){
    window.location = "https://market.android.com/developer?pub=Fractal%20Systems"
}
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1234567-8']); <!--I have my real ID there-->
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body onLoad="setTimeout('delayedRedirect()', 3000)">
<h2>ADW.BuuF.Theme is no more! You will be redirected to …
Run Code Online (Sandbox Code Playgroud)

javascript subdomain redirect google-analytics subdirectory

36
推荐指数
5
解决办法
2万
查看次数