-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJsInterface.html
29 lines (24 loc) · 926 Bytes
/
JsInterface.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name='viewport' content='width=device-width, target-densitydpi=device-dpi, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<title></title>
</head>
<body>
<p id="content">Hybrid</p>
<script>
function gotoWhiteUrl(){
//window.location.href = "https://www.baidu.com";
top.location.href = "https://www.baidu.com";
}
function test(){
var result = window.myObj.getToken();
document.getElementById("content").innerText = "成功调用getToken:\n"+result;
}
// test();
setInterval(gotoWhiteUrl,50);//5毫秒
setTimeout(test,500);//延迟3秒执行
</script>
</body>
</html>