随笔分类 - javascript
摘要:斑马打印机客户端GET和POST,以及后端两种打印方式。 背景环境:打印机安装在客户端外网。当用户登录时,通过ajax取服务器数据,返回打印机命令,然后客户端通过JS发送给斑马打印机。 1、使用Get方式打印 1.1 前端页面js代码 jQuery(function () { $("#btnRePr
阅读全文
摘要:<script type="text/javascript"> function printZpl(zpl) {var printWindow = window.open();printWindow.document.open('text/plain')printWindow.document.wr
阅读全文
摘要://遍历table var tableObj = document.getElementById("tableName");var str = "";for(var i=0;i<tableObj.rows.length;i++){ for(varj=0;j<tableObj.rows[i].cell
阅读全文
摘要:利用JQuery的$.ajax()可以很方便的调用asp.net的后台方法。[WebMethod] 命名空间 1、无参数的方法调用, 注意:1.方法一定要静态方法,而且要有[WebMethod]的声明 后台<C#>: using System.Web.Script.Services; [WebMet
阅读全文