[英]Page Navigation in Windows phone 7 Web App
我正在使用jquery mobile开发适用于Windows Phone 7的Web应用程序。
我想导航到将index.html转换为sample.html的页面。
function sample()
{
window.location.href = "Sample.html";
navigator.notification.alert("Navigated);
}
工作正常。
但是,当使用“ sample.html?id = 123123”添加查询字符串时
function sample()
{
window.location.href = "Sample.html?id=123123";
navigator.notification.alert("Navigated");
}
此导航不起作用。
任何人都可以指导。也欢迎使用任何其他导航方法以及querystring。
我们不能在Windows Phone 7的使用phonegap的Web应用程序中使用查询字符串。相反,我们可以使用Sample.html#12312
在PhoneGap Windows Phone应用程序中,它应类似于:
document.location = "Sample.html#id=123123";
要么:
window.location.href = "Sample.html#id=123123";
什么是txt? 当您尝试访问txt.value时,它似乎引发了异常,因为txt为null。 我认为它是页面上的文本框,因此您必须像$("input#txt").val();
一样访问它$("input#txt").val();
代替
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.