-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (60 loc) · 1.62 KB
/
index.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>NetSign测试</title>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<script src="./js/InfosecNetSignCNGAgent.min.js"></script>
<script src="./js/NetSignAgent.js"></script>
<script>
/**
* 验签、业务逻辑 服务端模式
* @param signedData
*/
/*function next1(signedData) {
$("#signedData").val(signedData);
//服务端验签
$.ajax({
type: "POST",
url: "./index.php",
data: {
signedData: signedData
},
dataType: "json",
success: function (data) {
$("#resData").val(JSON.stringify(data));
}
});
}
var obj = new NetSignAgent({
type: 1,
callback: next1,
defultDN: '投资',
});
obj.start_sign();*/
//前端模式
function next2(certDN) {
$("#resData").val(certDN);
}
var obj = new NetSignAgent({
type: 2,
callback: next2,
defultDN: '投资',
});
obj.start_sign();
</script>
<style>
textarea {width: 800px;height: 300px;}
</style>
</head>
<body>
<div>
<p>签名数据</p>
<textarea id="signedData" readonly></textarea>
</div>
<div>
<p>验签结果</p>
<textarea id="resData" readonly></textarea>
</div>
</body>
</html>