随笔分类 -  Web 前端技术

摘要:斑马打印机客户端GET和POST,以及后端两种打印方式。 背景环境:打印机安装在客户端外网。当用户登录时,通过ajax取服务器数据,返回打印机命令,然后客户端通过JS发送给斑马打印机。 1、使用Get方式打印 1.1 前端页面js代码 jQuery(function () { $("#btnRePr 阅读全文
posted @ 2018-01-29 09:20 chengeng 阅读(1517) 评论(0) 推荐(0) 编辑
摘要:<script type="text/javascript"> function printZpl(zpl) {var printWindow = window.open();printWindow.document.open('text/plain')printWindow.document.wr 阅读全文
posted @ 2017-12-29 16:43 chengeng 阅读(3113) 评论(0) 推荐(0) 编辑
摘要://遍历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 阅读全文
posted @ 2017-12-07 13:39 chengeng 阅读(232) 评论(0) 推荐(0) 编辑
摘要:利用JQuery的$.ajax()可以很方便的调用asp.net的后台方法。[WebMethod] 命名空间 1、无参数的方法调用, 注意:1.方法一定要静态方法,而且要有[WebMethod]的声明 后台<C#>: using System.Web.Script.Services; [WebMet 阅读全文
posted @ 2016-08-23 15:43 chengeng 阅读(1529) 评论(2) 推荐(0) 编辑
摘要:1准备工作引入JS文件和CSS文件2数据源2.1创建数据源·vardataSource=newkendo.data.DataSource({……});2.2数据源常用配置项·data:数据,数据类型有json和xmldata:[{"userId":63,"userNo":"test1","userN... 阅读全文
posted @ 2015-06-04 09:34 chengeng 阅读(6334) 评论(1) 推荐(0) 编辑
摘要:判断客户端设备 判断客户端设备 阅读全文
posted @ 2015-04-20 14:34 chengeng 阅读(222) 评论(0) 推荐(0) 编辑
摘要:模板页先判断是否有方法DocumentReady,有的话就调用1、模板页2、内容页DocumentReady(); 阅读全文
posted @ 2013-07-12 11:46 chengeng 阅读(254) 评论(0) 推荐(0) 编辑
摘要:<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, 阅读全文
posted @ 2013-06-19 09:04 chengeng 阅读(498) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示