device.name 設(shè)備的名稱
device.phonegap phonegap版本
device.platform 設(shè)備的類型
device.uuid 設(shè)備唯一識別號
device.version 所運行的操作系統(tǒng)的版本
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 myp = document.getElementById('props'); myp.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>
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com