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';
});
精彩评论