❑ DOM的核心: Node
由于DOM是树形结构,所以一个节点被抽象为对象Node,这是DOM的核心对象:
Node的种类一共有12种,通过Node.nodeType的取值来确定(为1-12),分为:
Node.ELEMENT_NODE (1)
Node.ATTRIBUTE_NODE (2)
Node.TEXT_NODE (3) //<![CDATA[ ]]>中括着的纯文本,它没有子节点
Node.CDATA_SECTION_NODE (4) //子节点一定为TextNode
Node.ENTITY_REFERENCE_NODE (5)
Node.ENTITY_ ...
- 12:28
- 浏览 (583)
- 评论 (3)
- 分类: javascript
- 进入论坛
- 发布在 javascript研究小组 圈子
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>move</title>
<style type="text/css">
body{
font-size:12px;
color:#849BCA;
}
#btn{
float:left;
}
#move{
width:500px;
height:200px;
background:#ED ...
- 13:45
- 浏览 (308)
- 评论 (1)
- 分类: javascript
- 发布在 javascript研究小组 圈子
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/Strict.dtd">
<html lang="en">
<head>
<style>
<!--
body{ margin:1% 0 0 1%; font-family:Arial,Verdana,Helvetica,sans-serif;font-size:75%;}
img{ border:0; }
...
- 10:49
- 浏览 (352)
- 评论 (1)
- 分类: javascript
- 发布在 javascript研究小组 圈子
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
<!--
function addLoadEv ...
- 17:06
- 浏览 (332)
- 评论 (0)
- 分类: javascript
<style>
#name{ float:left; height:25px;*height:24px;margin-right:10px;}
#btn{ cursor:pointer; background:#a5a5a5; border:1px solid #666666;padding:1px 3px 3px 3px;float:left;}
#box{ border:1px solid #a5a5a5; background:#a5a5a5; width:144px; color:#000;*margin-top:-15px;*width:146px;}
#box ...
- 18:06
- 浏览 (427)
- 评论 (0)
- 分类: javascript
- 进入论坛
- 发布在 javascript研究小组 圈子
1.document.write(""); 输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是: document->html->(head,body) 4.一个浏览器窗口中的DOM顺序是: window->(navigator,screen,history,location,document) 5.得到表单中元素的名称和值: document.getElementById("表单中元素的ID号").name(或value) 6.一个小写转大写的JS: document.getElementById("output ...
- 17:02
- 浏览 (198)
- 评论 (0)
- 分类: javascript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content ...
- 18:35
- 浏览 (275)
- 评论 (0)
- 分类: javascript
- 进入论坛
- 发布在 javascript研究小组 圈子
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content ...
- 14:31
- 浏览 (349)
- 评论 (0)
- 分类: javascript
- 进入论坛
- 发布在 javascript研究小组 圈子
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content ...
- 15:56
- 浏览 (183)
- 评论 (0)
- 分类: javascript
<html>
<head>
<title>日历</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body, p, div,td,input {font:menu;line-height: 150%}
.div { font-family: 宋体; font-size: 12px; line-height: 150% }
--> ...
- 22:32
- 浏览 (200)
- 评论 (0)
- 分类: javascript
以 IE 代替 Internet Explorer,以 MF 代替 Mozzila Firefox
1. document.form.item 问题
(1)现有问题:
现有代码中存在许多 document.formName.item("itemName") 这样的语句,不能在 MF 下运行
(2)解决方法:
改用 document.formName.elements["elementName"]
2. 集合类对象问题
(1)现有问题:
现有代码中许多集合类对象取用时使用 (),IE 能接受,MF 不能。
(2) ...
- 22:12
- 浏览 (345)
- 评论 (1)
- 分类: javascript
click() 对象.click() 使对象被点击。
closed 对象.closed 对象窗口是否已关闭true/false
clearTimeout(对象) 清除已设置的setTimeout对象
clearInterval(对象) 清除已设置的setInterval对象
confirm("提示信息") 弹出确认框,确定返回true取消返回false
cursor:样式 更改鼠标样式 hand crosshair text wait help default auto e/s/w/n-resize
event.clientX 返回最后一次点击鼠标X坐标值;
event.clientY 返回最 ...
- 20:04
- 浏览 (193)
- 评论 (0)
- 分类: javascript
连续英文换行(没有空格):1.IE中:word-break:break-all;和word-wrap:break-word;2.FF中:<div id="ff">abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</div>
<script>
function toBrea ...
- 17:35
- 浏览 (182)
- 评论 (0)
- 分类: javascript
All text links are opened in a new window. You can use one of the followings:
1.target=”_blank”
2.<a href="javascript:openWindow('http://');"></a>
function openWindow(link) {
window.open(link, '_blank', 'width=800,height=600,toolbar=yes,status=yes,location=yes,menubar=yes,directories=ye ...
- 17:42
- 浏览 (158)
- 评论 (0)
- 分类: javascript
[% IF phase_num == 1 %]
[%
copydeck.intro.body_copy_1 %]
...
- 17:38
- 浏览 (172)
- 评论 (1)
- 分类: javascript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charse ...
- 17:24
- 浏览 (335)
- 评论 (0)
- 分类: javascript
- 进入论坛
- 发布在 javascript研究小组 圈子
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charse ...
- 17:21
- 浏览 (346)
- 评论 (1)
- 分类: javascript
- 进入论坛
- 发布在 javascript研究小组 圈子
readonly="readonly";
or
<select onfocus="this.blur()" onmouseover="this.setCapture()" onmouseout="this.releaseCapture()" disabled>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4& ...
- 17:04
- 浏览 (1115)
- 评论 (4)
- 分类: javascript
- 进入论坛
- 浏览: 12016 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
mm
共 107 张
共 107 张
最近加入圈子
链接
最新评论
-
《css实战手册》读书笔记 ...
帮助新手理解而已,熟练了还是别这么记。
-- by rj045wq -
javaScript DOM特性/方法
看在是O+的份上.....
-- by sai619 -
jQuery插件
从Ext转向jQuery了,发现要自己写css真是一件“自虐”的事
-- by wangxin0072000 -
javaScript DOM特性/方法
这些概念都在Professional JavaScript for Web De ...
-- by softwin -
javaScript DOM特性/方法
w3school在线的手册也很全
-- by playfish






评论排行榜