Js脚本之jQuery学习笔记(1)一、javascript基础

单行注释

多行注释 /* */

数据类型

数值型

字符串型

布尔型

空值

未定义值

转义字符

函数定义:1234567891011121314<head><scriptlanguage="javascript"functiontest(m){varxixi=“嘻嘻”alert("这是javascript")document.write(xixi+m)}</script><head><body><scriptlanguage="javascript">test("哈哈")</script></body>**流程控制Javascript的流程控制如if、while、try/finaly这些和其他语言大致一样,用法同他函数类似。12if(){}内置对象string

方法:

indexOf()

toIpperCase()

replace()

内置对象Date

方法:

getYear()

getDay()

浏览器对象windows

方法:

window.open()

window.close()

浏览器对象document

方法:

write()

getElementById()

screen对象二、DOM基础

DOM文档对象模型,节点树。对Python中的beautifulSoup理解更深。

DOM的4个接口

Document接口

Node接口

Nodelist接口

nameNodemap接口

DOM常用对象

Document对象

Node对象

Nodelist对象

Element对象

Attr对象