随笔分类 - Web 前端技术
摘要:斑马打印机客户端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
阅读全文
摘要:1准备工作引入JS文件和CSS文件2数据源2.1创建数据源·vardataSource=newkendo.data.DataSource({……});2.2数据源常用配置项·data:数据,数据类型有json和xmldata:[{"userId":63,"userNo":"test1","userN...
阅读全文
摘要:模板页先判断是否有方法DocumentReady,有的话就调用1、模板页2、内容页DocumentReady();
阅读全文
摘要:<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Js压缩图片</title> <script type="text/javascript" > //img:图片对象 // w:宽度 // h:高度 function ctlImg(img, w,
阅读全文