开发者

Redirection does not take effect

开发者 https://www.devze.com 2023-03-27 05:02 出处:网络
In one of my projects, I have window.location.href=\'index.php\'. That project is big and it is absurd to paste whole code.

In one of my projects, I have window.location.href='index.php'. That project is big and it is absurd to paste whole code.

In it I have attached event handlers, some AJAX calls and few custom animations. I had solved this in other manner, but I would appreciated few 开发者_如何学编程suggestions why that command didn't work?

When I used FireBug to inspect code, and go step by step, redirection was successful.


Try to add your code to the onload handler or, if you use jQuery, in the ready handler:

$(document).ready(function() {
  window.location.href='index.php';
});
0

精彩评论

暂无评论...
验证码 换一张
取 消