<!DOCTYPE html> <html> <head> <title>设备属性Demo</title> <script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> // 等待加载PhoneGap document.addEventListener("deviceready", onDeviceReady, false); // PhoneGap加载完成 function onDeviceReady() { var element = document.getElementById('deviceProperties'); element.innerHTML = '获得设备的型号名称: ' + device.name + '<br />' + '获取设备上正在运行的PhoneGap版本信息: ' + device.phonegap + '<br />' + '获得设备使用的操作系统名称: ' + device.platform + '<br />' + '获得设备的全球唯一标识符(UUID): ' + device.uuid + '<br />' + '获得操作系统的版本号: ' + device.version + '<br />'; } </script> </head> <body onload="onLoad()"> <p id="deviceProperties">载入设备属性...</p> </body> </html>