How to navigate between different html pages in Wi

2019-07-19 00:50发布

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);

Can anyone tell me why in what all scenarios it won't work ? One option I found was iframe which I haven't tried yet.

1条回答
Anthone
2楼-- · 2019-07-19 01:27

This API isn't a specific page navigator; it's about loading the location as defined by the location service in WinJS: http://msdn.microsoft.com/en-us/library/windows/apps/hh452768.aspx has the details on the specifics of using that model.

That stated, if you wish to use the normal Web model of a new page, either a normal link, or setting the window.location to the other page will cause a browser navigate.

查看更多
登录 后发表回答