|
@@ -0,0 +1,59 @@
|
|
1
|
+<!DOCTYPE html>
|
|
2
|
+<html lang="en">
|
|
3
|
+
|
|
4
|
+<head>
|
|
5
|
+ <title>Test</title>
|
|
6
|
+ <meta charset="utf-8">
|
|
7
|
+ <meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
|
|
9
|
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
10
|
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
|
|
11
|
+ <script src="https://malsup.github.io/jquery.blockUI.js"></script>
|
|
12
|
+</head>
|
|
13
|
+
|
|
14
|
+<body>
|
|
15
|
+<div class="container">
|
|
16
|
+ <h2>Test</h2>
|
|
17
|
+ <form>
|
|
18
|
+ <button>Send</button>
|
|
19
|
+ </form>
|
|
20
|
+ <hr>
|
|
21
|
+ <div class="output"></div>
|
|
22
|
+</div>
|
|
23
|
+<div class="spinner-border" role="status" style="display: none">
|
|
24
|
+ <span class="sr-only">Loading...</span>
|
|
25
|
+</div>
|
|
26
|
+
|
|
27
|
+<script>
|
|
28
|
+ $(document).ready(function () {
|
|
29
|
+ $("button").click(function (e) {
|
|
30
|
+ e.preventDefault();
|
|
31
|
+
|
|
32
|
+ $.blockUI({
|
|
33
|
+ message: $('.spinner-border'),
|
|
34
|
+ css: {
|
|
35
|
+ backgroundColor: 'transparent',
|
|
36
|
+ border: '0'
|
|
37
|
+ },
|
|
38
|
+ });
|
|
39
|
+
|
|
40
|
+ $.ajax({
|
|
41
|
+ type: "get",
|
|
42
|
+ url: 'https://declare.taiwanpay.com.tw/api2021/info/Uogilvy00000000000000000000020001',
|
|
43
|
+ dataType: "json",
|
|
44
|
+ contentType: "application/json;charset=utf-8"
|
|
45
|
+ }).done(function (result) {
|
|
46
|
+ console.log(result)
|
|
47
|
+
|
|
48
|
+ }).fail(function (jqXHR, textStatus) {
|
|
49
|
+ console.log(jqXHR);
|
|
50
|
+ console.log(textStatus);
|
|
51
|
+ }).always(function () {
|
|
52
|
+ $.unblockUI();
|
|
53
|
+ });
|
|
54
|
+ });
|
|
55
|
+ });
|
|
56
|
+</script>
|
|
57
|
+</body>
|
|
58
|
+
|
|
59
|
+</html>
|