ios phonegap的window.unload执行
作者:本站编辑 发布时间:2015-11-24 来源:本站原创
点击数:
完整例子:
<!DOCTYPE html>
<html>
<head>
<title>Device Ready Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load //
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
} // device APIs are available //
function onDeviceReady() {
// Now safe to use device APIs
}
</script>
</head>
<body onload="onLoad()">
</body>
</html>