device.name 设备的名称
device.phonegap phonegap版本
device.platform 设备的类型
device.uuid 设备唯一识别号
device.version 所运行的操作系统的版本
device是被指派给window对象的
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>My Device</title> <script type="text/javascript" charset="UTF-8" src="cordova.js"></script> <script type="text/javascript" charset="UTF-8"> function onLoad() { document.addEventListener("deviceready", onDeviceReady, false); } function onDeviceReady() { var myDiv = document.getElementById('props'); myDiv.innerHTML = 'Device Name: ' + device.name + '<br />' + 'Device PhoneGap: ' + device.phonegap + '<br />' + 'Device Platform: ' + device.platform + '<br />' + 'Device UUID: ' + device.uuid + '<br />' + 'Device Version: ' + device.version + '<br />' } </script> </head> <body onload="onLoad()"> <p id="props"> Loading device properties...</p> </body> </html>