This version of the documentation is outdated!
Click here for the latest released version.
splashscreen.show
顯示初始螢幕。
navigator.splashscreen.show();
說明
此方法顯示應用程式的初始螢幕。
支援的平臺
- Android 系統
- iOS
- Windows Phone 7 和 8
- Windows 8
快速的示例
navigator.splashscreen.show();
完整的示例
<!DOCTYPE html>
<html>
<head>
<title>Splashscreen 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
//
document.addEventListener("deviceready", onDeviceReady, false);
// device APIs are available
//
function onDeviceReady() {
navigator.splashscreen.show();
}
</script>
</head>
<body>
<h1>Example</h1>
</body>
</html>