摘要: 节点属性在文档对象模型 (DOM) 中,每个节点都是一个对象。DOM 节点有三个重要的属性 :1. nodeName : 节点的名称2. nodeValue :节点的值3. nodeType :节点的类型一、nodeName 属性: 节点的名称,是只读的。1. 元素节点的 nodeName 与标签名... 阅读全文
posted @ 2016-01-20 17:21 Young汨 阅读(955) 评论(0) 推荐(0) 编辑
摘要: sort()方法使数组中的元素按照一定的顺序排列。 语法: arrayObject.sort(方法函数) 参数说明: 1.如果不指定,则按unicode码顺序排列。 2.如果指定,则按所指定的排序方法排序。 注意:该函数要比较两个值,然后返回一个用于说明这两个值的相对顺序的数字。比较... 阅读全文
posted @ 2016-01-20 17:02 Young汨 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 时间格式化的方法: 1 Date.prototype.Format = function (fmt) { //author: meizz 2 var o = { 3 "M+": this.getMonth() + 1, //月份 ... 阅读全文
posted @ 2016-01-20 16:45 Young汨 阅读(2624) 评论(0) 推荐(0) 编辑