随笔分类 -  JavaScript

摘要:1.页面元素边框的属性属性说明boder设置边框样式的复合属性border-color设置边框的颜色值border-style设置边框的样式,包括none(无边框),dotted(点划线),dashed(虚线),solid(实线),double(双线),groove(槽状),ridge(脊状),inset(凹陷),outset(凸出)border-width设置边框宽度border-top, border-right, border-bottom, border-left分别设置上、右、下和左边框的复合属性border-top-color, border-right-color, border 阅读全文
posted @ 2012-07-04 15:26 lihui_yy 阅读(382) 评论(0) 推荐(0) 编辑
摘要: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 阅读(361) 评论(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) 编辑
摘要:主要有三种:HTML选择器、class选择器、ID选择器1.HTML选择器 1 <html> 2 <head> 3 <style type="text/css"> 4 p{ 5 color:red; 6 font-family:System 7 } 8 </style> 9 </head>10 11 <body>12 <p>这里应用样式表</p> 13 </body>14 </html>也就是说选择器是HTML标签2.class选择器 1 <html 阅读全文
posted @ 2012-02-09 16:11 lihui_yy 阅读(2574) 评论(0) 推荐(0) 编辑
摘要:1.内联样式表使用内联样式表时,建议在网页的<head></head>标签之间增加一个<meta>标签1 <html>2 <head>3 <meta http-equiv="content-type" content="text/css; charset=UTF-8">4 </head>5 <body>6 <p>这里没有应用样式表</p>7 <p style="color:red; font-family:System; 阅读全文
posted @ 2012-02-09 11:30 lihui_yy 阅读(308) 评论(0) 推荐(1) 编辑