摘要: 1.DOM 的4个基本接口 Document Node NodeList NamedNodeMap2.DOM 基本对象 (1)Document 对象 (2)Node 对象 nodeType 属性返回节点的类型:Element(1)、Attr(2)、Text(3)、Comment(8)、Document(9)、DocumentFragment(11) (3)NodeList 对象 (4)Elment 对象 (5)Attr 对象3.判断文本是否空格的方法: if(node.nodeType == 3 && !/\s/.test(node.nodeValue)){...... 阅读全文
posted @ 2012-07-03 21:25 lihui_yy 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 1.变量的类型 3种 x = 19.2; //数字型 y = "name"; //字符串型 m = true; //布尔型2.数据的类型 4种基本数据类型、2种复合数据类型 基本数据类型:数值型、字符串型、布尔型、空值null 复合数据类型:对象、数组。(表示基础数据类型的集合)3.运算符 其中的字符串运算符(+),用于连接字符串。 注意:JavaScript为弱类型语言,在不同类型之间的变量进行运算时,会优先考虑字符串类型。如,8+"8"的执行结果为884.try catch finally 语句 try{ }catch(msg){ alert(msg 阅读全文
posted @ 2012-07-03 14:22 lihui_yy 阅读(286) 评论(0) 推荐(0) 编辑