Javascript $.mobile.showPageLoadingMsg(“b”,这只是一个测试”,正确);不起作用
我想使用Javascript $.mobile.showPageLoadingMsg(“b”,这只是一个测试”,正确);不起作用,javascript,jquery,html,Javascript,Jquery,Html,我想使用$。mobile.showPageLoadingMsg(“b”,“这只是一个测试”,true),但它不起作用: <script src="js/jqeury/jquery.js"></script> <script src="js/jqeury/jquery.mobile-1.1.1.js"></script> 我的代码如下: <script type="text/javascript" charset="utf-8">
$。mobile.showPageLoadingMsg(“b”,“这只是一个测试”,true)
,但它不起作用:
<script src="js/jqeury/jquery.js"></script>
<script src="js/jqeury/jquery.mobile-1.1.1.js"></script>
我的代码如下:
<script type="text/javascript" charset="utf-8">
$.mobile.showPageLoadingMsg("b", "This is only a test", true);
//show the loading message. alert("OK"); </script>
$.mobile.showPageLoadingMsg(“b”,“这只是一个测试”,true);
//显示加载消息。警报(“正常”);
正如RoManiac指出的,您有一个输入错误:js/jqeury
tojs/jquery
(当然,我们不确定这是否是您的dir结构,但假设…)-您可以通过执行以下操作来测试jquery和jQM是否已加载
console.log("Is jQuery loaded: "+ (jQuery != undefined));
console.log("Is jQuery Mobile loaded: "+ (jQuery.mobile != undefined));
另外,尝试将代码包装到页面初始化事件中(更改id以匹配页面id)
你打错了。
将
js/jqeury
修改为js/jquery错误::“未定义”不是一个对象(正确加载$.mobile.showPageLoadingMsgmy jquery文件。但同样的问题请尝试并执行console.log($.mobile!=未定义)
如果为真,则已加载mobile。这是一个问题链接感谢您的帮助:)消息显示在仿真器的左侧,如何聚焦以使其显示全部清除$。mobile.showPageLoadingMsg(“b”,“这只是一个测试”,true)//显示加载消息。消息显示在仿真器的左侧,如何聚焦以使其显示全部清除$。mobile.showPageLoadingMsg(“b”,“这只是一个测试”,true)//显示加载消息。
$("#page1").live("pageinit",function(){
$.mobile.showPageLoadingMsg("b", "This is only a test", true);
});