2011-04-29 78 views
0

我有我的网址 一个问题就是我有一些这样的事更改URL使用JavaScript/JQuery的

http://somelink.com/mobile/somethinghere 

我需要它来改变它的东西是这样的:

http://somelink.com/mobile/index.html 

在这里的东西将改变动态我不需要。

那么有什么办法可以避免这种情况,并用另一种方法替代它。

+1

这是什么东西? – Ibu 2011-04-29 04:40:23

+0

url.that中的东西总是会改变 – Devan 2011-04-29 04:47:12

+0

这里的某些页面在URL – Devan 2011-04-29 04:47:45

回答

1

使用

location.href = 'http://somelink.com/mobile/index.html' 
0

如果动态加载内容,不想要的网址更改,使用$.load('pageToLoad', function() { }),或修改这样的窗口的位置:window.location.href='blah'

0

如果Somethingthere一些页面上,您可以在该页面上编写一些脚本,该脚本将重定向到Index.html。我想你可以使用window.onload()来做到这一点。