123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
-
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>SFunction</title>
- <script src="~/Content/js/jquery.min.js"></script>
- <script>
- $(function () {
- //二维码
- (function () {
- var img_src = $('.qr_img')[0].src;
- if (browserIsIe()) {//假如是ie浏览器
- //$('.down_qr').on('click', function () {
- // img_src = $('.qr_img')[0].src;
- // DownLoadReportIMG(img_src);
- //});
- } else {
- //$('.down_qr').attr('download', img_src);
- //$('.down_qr').attr('href', img_src);
- $('.down_qr').on('click', function () {
- $('.down_qr').attr('download', img_src);
- $('.down_qr').attr('href', img_src);
- });
- }
- })();
- });
- //function DownLoadReportIMG(imgPathURL) {
- // //如果隐藏IFRAME不存在,则添加
- // if (!document.getElementById("IframeReportImg"))
- // $('<iframe style="display:none;" id="IframeReportImg" name="IframeReportImg" onload="DoSaveAsIMG();" width="0" height="0" src="about:blank"></iframe>').appendTo("body");
- // if (document.all.IframeReportImg.src != imgPathURL) {
- // //加载图片
- // document.all.IframeReportImg.src = imgPathURL;
- // }
- // else {
- // //图片直接另存为
- // DoSaveAsIMG();
- // }
- //}
- //function DoSaveAsIMG() {
- // if (document.all.IframeReportImg.src != "about:blank")
- // window.frames["IframeReportImg"].document.execCommand("SaveAs");
- //}
- //判断是否为ie浏览器
- function browserIsIe() {
- if (!!window.ActiveXObject || "ActiveXObject" in window)
- return true;
- else
- return false;
- }
- function f_ExecNone() {
- $.ajax({
- url: "/SystemModule/SFunctionExecNone?ran=" + Math.random(),
- type: "POST",
- dataType: "text",
- data: { txtScript: $("#txtScript").val(), Type: '0' },
- success: function (data) {
- $("#txtResult").val(data);
- }
- })
- }
- function f_ExecQry() {
- $.ajax({
- url: "/SystemModule/SFunctionExecNone?ran=" + Math.random(),
- type: "POST",
- dataType: "text",
- data: { txtScript: $("#txtScript").val(), Type: '1' },
- success: function (data) {
- $("#txtResult").val(data);
- }
- })
- }
- function f_Request() {
- $.ajax({
- url: "/SystemModule/SFunctionExecQuery?ran=" + Math.random(),
- type: "POST",
- dataType: "text",
- data: { txtHttpContent: encodeURIComponent($("#txtHttpContent").val()), url: $("#url").val() },
- success: function(data) {
- $("#txtHttpResult").val(data);
- }
- });
- }
- </script>
- </head>
- <body>
- <img class="qr_img" src="~/Images/02.gif" download="" /> <a href="#" class="down_qr" >dsadsadasdasd</a>
- <div>
- <textarea id="txtScript" rows="5" placeholder="输入执行的Sql" style="width:80%"></textarea>
- </div>
- <div style="margin-top:20px">
- <button id="btnExecNone" name="btnExecNone" onclick="f_ExecNone()">btnExecNone</button> | <button id="btnExecQry" name="btnExecQry" onclick="f_ExecQry()">btnExecQry</button>
- </div>
- <div style="margin-top:20px">
- <textarea id="txtResult" rows="30" placeholder="" style="width:80%"></textarea>
- </div>
- <div><input type="text" id="url" value="http://jsms.sipac.gov.cn/CheckData/DataTransfer.aspx" style="width: 400px"/></div>
- <div>
- <textarea id="txtHttpContent" rows="30" placeholder="输入报文内容" style="width:80%"></textarea>
- </div>
- <div style="margin-top:20px">
- <button id="btnExecRequest" name="btnExecRequest" onclick="f_Request()">btnExecRequest</button>
- </div>
- <div>
- <textarea id="txtHttpResult" rows="5" placeholder="" style="width:80%"></textarea>
- </div>
- </body>
- </html>
|