<!doctype html> <html> <head> <head> <meta charset = utf-8> <title>數據庫示例</title> <腳本> text/javascript charset = utf-8 src = cordova = cordova> cordova> </script> </script> <script type = text/javascript charset = utf-8> document.addeventlistener(deviceready,ondeviceready,false);函數OnDevicEready(){}函數onSuccess(contacts){document.write(contacts.length+'contacts condud.'); for(var i = 0; i <contacts.length; i ++){for(var j = 0; j <contacts [i] .emails.length; j ++){document.write(email =+contacts [ i] .emails .emails [J] .Email); }} alert('Success'); }函數OnError(error){alert(ooops!); }函數findContact(){var myoptions = new ContactFindOptions(); myoptions.filter = gmail; //過濾var myfields = [emails]; //要查詢的字段navigator.contacts.find(myfields,onSuccess,onSuccess,onerror,yroptions); } </script> </head> <body> <button onclick = findContact();>查找聯繫人</button> </button> </body> </html>以上這篇使用phonegap查找聯繫人的實現方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持vevb武林網。