-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path1.html
More file actions
31 lines (31 loc) · 868 Bytes
/
Copy path1.html
File metadata and controls
31 lines (31 loc) · 868 Bytes
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
28
29
30
31
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script language="javascript">
function ShowMessageBox()
{
if (cpp_object != null)
cpp_object.ShowMessageBox("你好,我是Javascript,你是谁?");
}
function GetProcessID()
{
if (cpp_object != null)
{
var id = cpp_object.GetProcessID();
document.getElementById("process_info").innerText = "本进程ID为:" + id;
}
}
function SaveCppObject(obj)
{
cpp_object = obj;
}
var cpp_object;
</script>
</head>
<body>
<p id="process_info"></p>
<button type="button" onclick="ShowMessageBox()">MessageBox</button>
<button type="button" onclick="GetProcessID()">Process ID</button>
</body>
</html>