Windows phone 7 javascript document.ready()函数在装有cordova 1.5的windows phone emulator中不起作用

Windows phone 7 javascript document.ready()函数在装有cordova 1.5的windows phone emulator中不起作用,windows-phone-7,cordova,Windows Phone 7,Cordova,我刚刚使用VisualStudioCordova初学者模板创建了一个新项目。但是,当从WindowsPhone7模拟器运行时,我无法调用javascript文档就绪函数。从浏览器运行时,称为fine ondevicerady()…会被记录到控制台,但是$(文档)。ready(…)不会 有人能看出这有什么明显的原因吗 <!DOCTYPE html> <html> <head> <meta name="viewport" content="wid

我刚刚使用VisualStudioCordova初学者模板创建了一个新项目。但是,当从WindowsPhone7模拟器运行时,我无法调用javascript文档就绪函数。从浏览器运行时,称为fine

ondevicerady()…
会被记录到控制台,但是
$(文档)。ready(…)
不会

有人能看出这有什么明显的原因吗

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>

    <title>Title</title>

    <link rel="stylesheet" href="jquery.mobile-1.0.1.css"/>
    <script src="jquery-1.7.1.js"></script>
    <script src="jquery.mobile-1.0.1.js"></script>
    <script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script>
  </head>
  <body>
    <div id="home" data-role="page">
    </div>
    <script type="text/javascript">
        document.addEventListener("deviceready", onDeviceReady, false);

        function onDeviceReady() {
            console.log("onDeviceReady. You should see this message in Visual Studio's output window.");
        }

        $(document).ready(function () {
            console.log("doc ready");
        });
    </script>
  </body>
</html>

标题
文件。添加的监听器(“deviceready”,OnDeviceraddy,false);
函数ondevicerady(){
log(“ondevicerady.You应该在VisualStudio的输出窗口中看到此消息。”);
}
$(文档).ready(函数(){
控制台日志(“文件准备就绪”);
});

document.ready很可能在PhoneGap代码初始化您正在登录的控制台之前被调用。WP7浏览器没有自己的控制台,该控制台由PhoneGap框架实现