问题描述
我创建了一个小型的2页面应用程序,但是当我使用GET变量导航到页面时失败,例如
window.location.href ='game.html?id = 2'
使用 www / game.html
效果很好,但打破了逻辑。
上面的 window.location.href
throws
CordovaBrowser_NavigationFailed :: www / game.html?id = 2
将'?'符号替换为#我测试,它工作正常
详细:
原始代码
window.location.href ='game.html?id = 2' / p>
替换为
window.location.href ='game.html#id = 2'
Jquery for windows phone不支持'?'符号
I've created a small 2 page application, but it fails when I navigate to a page using GET variables, like
window.location.href = 'game.html?id=2'
Navigating by using www/game.html
works great, but breaks the logic. Could anyone tell me why this is?
The above window.location.href
throws
CordovaBrowser_NavigationFailed :: www/game.html?id=2
Replace '?' symbol with # I tested, it works fine
Detailed:
Original codewindow.location.href = 'game.html?id=2'
Replace aswindow.location.href = 'game.html#id=2'
Jquery for windows phone doesn't support '?' symbol
这篇关于当我使用GET变量时,在phonegap应用程序中导航失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!