摘要: 把jsp页面的input 标签设置成不可编辑: <input name="Id" value="${order.Id}" readOnly="true" disabled="true" /> 如果设置了 disabled="true" , 该input标签不是successful的表单元素, 不能提 阅读全文
posted @ 2016-06-23 15:58 zhoudingzhao 阅读(3322) 评论(1) 推荐(0) 编辑
摘要: JS请求后台数据报错: XMLHttpRequest cannot load http://192.168.1.163/ajaxdemo/server.php?number=101. No 'Access-Control-Allow-Origin' header is present on the 阅读全文
posted @ 2016-06-07 15:26 zhoudingzhao 阅读(165) 评论(0) 推荐(0) 编辑
摘要: nodejs 事件模块 events 只有一个对象 EventEmitter 。 var EventEmitter = require('events').EventEmitter;var life = new EventEmitter(); //生成 EventEmitter 对象的实例 life 阅读全文
posted @ 2016-06-03 14:37 zhoudingzhao 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 上下文:this关键字通常指向当前函数的拥有者,把拥有者叫做执行上下文。 this代表函数运行时自动生成的内部对象,只能在函数内部使用。 构造函数中的this 指 构造函数的实例对象。javascript存在定义时上下文和运行时上下文。 函数的 call 和 apply 方法 可以改变上下文执行对象 阅读全文
posted @ 2016-06-02 17:02 zhoudingzhao 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1、下载 XAMPP 套件: https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/stats/timeline 下载的文件是 xampp-linux-x64-7.0.6-0-installer.run 2、 执行 ./xampp-li 阅读全文
posted @ 2016-05-30 18:24 zhoudingzhao 阅读(1892) 评论(0) 推荐(0) 编辑
摘要: offset()获取标签离左上角的位置,离顶部和左部的距离。离整个屏幕的左上角的距离。 position() 相对于某一个标签的位置。离父标签的距离。离父标签的左上角的距离。 height(), width() 自己的高度 和宽度。不包括边框。innerHeight() , innerWidth() 阅读全文
posted @ 2016-05-29 10:14 zhoudingzhao 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 一、 javascript 的 内置对象: Object 和 Function javascript所有东西,包括 Function 都是对象 。 Array 其实是一个 Function 类型的对象, 它的prototype 是指向了 Function.prototype 。 new Array( 阅读全文
posted @ 2016-05-27 00:20 zhoudingzhao 阅读(221) 评论(0) 推荐(0) 编辑
摘要: nodejs 可以直接在返回中使用html标签,例如下面的格式,返回 hello world 将会使用 h1 字体。 app.get('/html',function(req,res){ res.status(200).send('<h1>hello world</h1>');}); "E" is 阅读全文
posted @ 2016-05-25 17:49 zhoudingzhao 阅读(6344) 评论(0) 推荐(0) 编辑
摘要: 1、toggleClass() 如果对象有class属性,则删除; 如果没有class属性,则加上。 <style> .hide{ display: none; } </style> <div id='nid'>12<a>google</a>34</div> $('#nid').toggleClas 阅读全文
posted @ 2016-05-25 00:25 zhoudingzhao 阅读(162) 评论(0) 推荐(0) 编辑
摘要: jquery 的 for 循环: 1、 var userList = [11,22,33,44]; $.each(userList,function(i,item){ console.log(i, item); }); 结果输出: 0 11 1 22 2 33 3 44 用法: $.each() 第 阅读全文
posted @ 2016-05-24 23:45 zhoudingzhao 阅读(52536) 评论(1) 推荐(0) 编辑