Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript $.mobile.showPageLoadingMsg(“b”,这只是一个测试”,正确);不起作用_Javascript_Jquery_Html - Fatal编程技术网

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
to
js/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); 
});