【发布时间】:2012-10-10 15:15:40
【问题描述】:
所以,我使用的是 IBM Worklight,我有一个名为 file1.html 的主文件,然后我创建了另一个名为 file2.html 的 html 文件。
我正在尝试打开 file2,但到目前为止没有运气。我尝试了以下代码:
$(this).load("file2.html");$("div1").load("file2.html"); //div1 is the id for outer div of file1WL.App.openUrl("file2.html");window.openURL("file2.html");
这些都不起作用!有什么建议吗?
【问题讨论】:
-
试过
window.location.href = 'file2.html'? -
如果你选择
id,那么你需要在id前加上#:$('#div1').load(/* ...other stuff... */); -
怎么打开?在新的单独浏览器选项卡中?还是在同一个选项卡中(替换当前页面)?还是作为弹出窗口?还是进入当前页面中的 IFRAME 元素?或者只是将第二页的内容转储到当前页中?你必须更具体。
标签: javascript jquery html select ibm-mobilefirst