1)使用build.phonegap.com
2)添加config.xml中與在資產以下\ WWW文件夾
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.example"
version = "1.0.0">
<name>PhoneGap Build Application</name>
<description>
A simple PhoneGap Build application.
</description>
<author href="https://example.com" email="[email protected]">
Your Name
</author>
<preference name="orientation" value="portrait" />
<feature name="http://plugins.phonegap.com/ChildBrowser/2.0.1" />
<access origin="*" />
</widget>
3)刪除哪些是你使用來自特定頁面提及的所有phonegap2.xxjs和childbrowser2.xxjs childbrowser功能(如index.html的) 然後簡單地添加,即使它不在文件夾(PhoneGap的生成器將使用更新後的版本)
<script src="phonegap.js"></script>
<script src="childbrowser.js"></script>
4)只是把測試
<ul>
<li><a href="#" onClick="window.plugins.childBrowser.showWebPage('http://www.xyz.com')">Click here to open</a></li>
</ul>
以下以下
希望最好:)