Spaces:
Running
Running
File size: 1,823 Bytes
a5e9265 |
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 |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="http://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/util.js"></script>
<script type="text/javascript" src="../js/cx.js"></script>
</head>
<body>
<input id="text" type="text" placeholder="请输入需要生成的二维码内容..." style="width:50%" />
<br />
<div id="畅心"></div>
<hr>
<div class="btn-group">
<button type="button" class="btn btn-primary" onclick="onbuttonclick('fn')">A1写入常量</button>
<button type="button" class="btn btn-primary" onclick="onbuttonclick('fb')">交互写入斐波那契数列指定项</button>
<button type="button" class="btn btn-primary" onclick="onbuttonclick('fn2')">将网页内容写入WPS客户端</button>
<button type="button" class="btn btn-primary" onclick="fn3()">将WPS客户端数据写入网页</button>
</div>
<p id="wps-data">测试引用wps客户端数据</p>
<script>
var qrcode = new QRCode(document.getElementById("畅心"), {width : 200,height : 200});
function makeCode () {
var x= $("#text").val();
qrcode.makeCode(x);
let curSheet = wps.EtApplication().ActiveSheet;
curSheet.Cells.Item(1, 1).Formula="执一以为天下式!" + curSheet.Cells.Item(1, 1).Formula
}
$("#text").on("blur", function () {makeCode();}).on("keydown", function (e) {if (e.keyCode == 13) {makeCode();}});
function fn3(){
let ash = wps.EtApplication().ActiveSheet;
$("#wps-data").text(ash.Cells.Item(1, 1).Value())
}
</script>
</body>
</html> |