changxin commited on
Commit
a5e9265
1 Parent(s): 734daa2

Upload cx.html

Browse files
Files changed (1) hide show
  1. wps-test/ui/cx.html +38 -0
wps-test/ui/cx.html ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
+ <script src="http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
5
+ <script src="http://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
6
+ <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
7
+ <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
8
+ <script type="text/javascript" src="../js/util.js"></script>
9
+ <script type="text/javascript" src="../js/cx.js"></script>
10
+ </head>
11
+ <body>
12
+ <input id="text" type="text" placeholder="请输入需要生成的二维码内容..." style="width:50%" />
13
+ <br />
14
+ <div id="畅心"></div>
15
+ <hr>
16
+ <div class="btn-group">
17
+ <button type="button" class="btn btn-primary" onclick="onbuttonclick('fn')">A1写入常量</button>
18
+ <button type="button" class="btn btn-primary" onclick="onbuttonclick('fb')">交互写入斐波那契数列指定项</button>
19
+ <button type="button" class="btn btn-primary" onclick="onbuttonclick('fn2')">将网页内容写入WPS客户端</button>
20
+ <button type="button" class="btn btn-primary" onclick="fn3()">将WPS客户端数据写入网页</button>
21
+ </div>
22
+ <p id="wps-data">测试引用wps客户端数据</p>
23
+ <script>
24
+ var qrcode = new QRCode(document.getElementById("畅心"), {width : 200,height : 200});
25
+ function makeCode () {
26
+ var x= $("#text").val();
27
+ qrcode.makeCode(x);
28
+ let curSheet = wps.EtApplication().ActiveSheet;
29
+ curSheet.Cells.Item(1, 1).Formula="执一以为天下式!" + curSheet.Cells.Item(1, 1).Formula
30
+ }
31
+ $("#text").on("blur", function () {makeCode();}).on("keydown", function (e) {if (e.keyCode == 13) {makeCode();}});
32
+ function fn3(){
33
+ let ash = wps.EtApplication().ActiveSheet;
34
+ $("#wps-data").text(ash.Cells.Item(1, 1).Value())
35
+ }
36
+ </script>
37
+ </body>
38
+ </html>