[英]Page Navigation in Windows phone 7 Web App
I'm developing an web app for Windows Phone 7 using jquery mobile. 我正在使用jquery mobile开发适用于Windows Phone 7的Web应用程序。
I want to navigate to a page say index.html to sample.html. 我想导航到将index.html转换为sample.html的页面。
function sample()
{
window.location.href = "Sample.html";
navigator.notification.alert("Navigated);
}
It works fine. 工作正常。
But when a querystring is added with "sample.html?id=123123" 但是,当使用“ sample.html?id = 123123”添加查询字符串时
function sample()
{
window.location.href = "Sample.html?id=123123";
navigator.notification.alert("Navigated");
}
This navigation does not work. 此导航不起作用。
Can anyone please guide.Anyother navigation method along with querystring is also welcome. 任何人都可以指导。也欢迎使用任何其他导航方法以及querystring。
我们不能在Windows Phone 7的使用phonegap的Web应用程序中使用查询字符串。相反,我们可以使用Sample.html#12312
In a PhoneGap Windows Phone application it should be like: 在PhoneGap Windows Phone应用程序中,它应类似于:
document.location = "Sample.html#id=123123";
Or: 要么:
window.location.href = "Sample.html#id=123123";
What is txt? 什么是txt? It looks like it might be throwing an exception when you try to access txt.value, because txt is null. 当您尝试访问txt.value时,它似乎引发了异常,因为txt为null。 I assume it is a textbox on the page, so you'd have to access it like $("input#txt").val();
我认为它是页面上的文本框,因此您必须像$("input#txt").val();
一样访问它$("input#txt").val();
instead 代替
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.