Phonegap for IOS Plugin插件开发(3)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-18 20:55 点击:次
<h1>Apache Cordova kllmctrl</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
</div>
<script type="text/javascript" src="cordova-2.1.0.js"></script>
<script type="text/javascript" src="js/MyPlugin.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
/**
* 加载成功调用js
*/
MyPlugin.add("My","Plugin",addSuc,addFiald);
}
</script>
<script type="text/javascript">
/**
* js回调函数
*/
function addSuc(result) {
console.log('addSuc='+result);
}
function addFiald() {
console.log('addFiald');
}
</script>
相关新闻>>
- 发表评论
-
- 最新评论 更多>>