我认为,在文件输入问题上,你失踪。 你们需要进口<条码>电话gap-1.2.0.js,而不是<条码>电话gap.j。
在5台模拟器和装置上进行氮化工作。
<!DOCTYPE html>
<html>
<head>
<title>Device Properties Example</title>
<script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for PhoneGap to load
document.addEventListener("deviceready", onDeviceReady, false);
// PhoneGap is ready
function onDeviceReady() {
var myOptions = { enableHighAccuracy: true };
navigator.geolocation.getCurrentPosition(onSuccess, onError,myOptions);
}
// onSuccess Geolocation
function onSuccess(position) {
var element = document.getElementById( geolocation );
element.innerHTML = Latitude: + position.coords.latitude +
+
Longitude: + position.coords.longitude +
+
Altitude: + position.coords.altitude +
+
Accuracy: + position.coords.accuracy +
+
Altitude Accuracy: + position.coords.altitudeAccuracy +
+
Heading: + position.coords.heading +
+
Speed: + position.coords.speed +
+
Timestamp: + new Date(position.timestamp) +
;
}
// onError Callback receives a PositionError object
function onError(error) {
alert( code: + error.code +
+
message: + error.message +
);
}
</script>
</head>
<body>
<p id="geolocation">Finding geolocation...</p>
</body>
</html>