id

MUI HTML5

MUI

id

Webview窗口的标识

说明:

String 类型

在打开或创建Webview窗口时设置,如果没有设置窗口标识,此属性值为undefined。

示例:


<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<title>Webview Example</title>
	<script type="text/javascript">
// H5 plus事件处理
function plusReady(){
	// 获取自身webview窗口
	var ws=plus.webview.currentWebview();
	console.log( "窗口标识: "+ws.id );
}
if(window.plus){
	plusReady();
}else{
	document.addEventListener("plusready",plusReady,false);
}
	</script>
	</head>
	<body>
		Webview窗口的标识<br/>
	</body>
</html>