问题描述
您好
如何使用javascript在不同的html页面之间导航? 我试着使用下面的语句,但它不起作用。我添加了一个断点,发现了 执行以下语句。但它仍然不显示page2.html。
How can i navigate between different html pages using javascript? I tried to use the below statement but it's not working. I have added a breakpoint and found that the below statement is executed.But still It doesn't display the page2.html .
WinJS.Navigation.navigate(" page2.html",null);
WinJS.Navigation.navigate("page2.html", null);
任何人都可以告诉我为什么所有场景都不起作用? (href和ifrmae是其他选项)
Can anyone tell me why in what all scenarios it won't work ? (href and ifrmae are the other options though)
建议的方法是什么?
关心Krrishna
Regards Krrishna
推荐答案
首先查看示例:
http://code.msdn.microsoft.com/windowsapps/Navigation-sample-cf242faa
然后通过快速入门:
然后检查创建导航样式应用程序时创建的模板。
And then inspect the template that is created when you create a navigation style app.
-Jeff
这篇关于winjs.navigation.navigate无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!