浏览器没有重定向,但网址正在改变

vis*_*hal 5 javascript php browser jquery redirect

嘿家伙我想通过点击整行来重定向我的页面...

为此,我的HTML表格行在javascript下创建.

id = 1;
<tr onclick="document.location.href='http://localhost/emailc/emailCampaignEdit/"+id+"'">
    <td><b>abc</b></td>
</tr>
Run Code Online (Sandbox Code Playgroud)

在点击上面的代码之前我的浏览器的网址是 http://localhost/emailc

点击代码后,我想在我的网址上重定向我的网页 http://localhost/emailc/emailCampaignEdit/1

浏览器网址在点击时完美变化.但浏览器没有重定向到该URL.如果我刷新该网址上的浏览器,那么它就像我想要的那样工作.

我也试过这个来测试语法

<tr onclick="document.location.href='http://www.google.com'">
    <td><b>abc</b></td>
</tr>
Run Code Online (Sandbox Code Playgroud)

它完美的作品,浏览器是完全重定向到谷歌网页,我也测试了其他重定向代码喜欢window.location.href或window.location.assign或window.location任何事物都有同样的问题.