对于我的cordova项目,设备未正确启动(至少在iOS中).我已经搜索了几个小时但仍然无法解决这个问题.我做错了什么吗? js / cordova.js的路径也存在:
<html> <head> <title>Geolocation</title> <Meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,target-densityDpi=device-dpi,user-scalable=no" /> <Meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="css/app.css"> <script type="text/javascript"> // Fastclick if ('addEventListener' in document) { document.addEventListener('DOMContentLoaded',function() { FastClick.attach(document.body); },false); } </script> <script type="text/javascript" charset="utf-8" src="js/cordova.js"></script> <script type="text/javascript" charset="utf-8"> // Wait for device API libraries to load // function onLoad() { document.addEventListener("deviceready",onDeviceReady,false); } // device APIs are available // function onDeviceReady() { alert("ready"); // Now safe to use device APIs } </script> </head> <body onload="onLoad()">
我不确定我错过了什么,因为如果我在Chrome中检查,我没有收到任何错误.谢谢您的帮助!