一.基本语法
var,if,switch,for,while,do while,break,isNaN,parseInt,parseFloat
二.Dom模型
window
(setInterval(设置定时器),clearInterval(清除定时器),alert,confirm(弹出对话框),parent(window的父元素),opener,window.open(打开新窗口并装入给定 URL 的文档。)
,window.showModalDialog(创建一个显示指定 HTML 文档的模式对话框。),window.frames[](获取给定文档定义或与给定窗口关联的文档定义的所有 window 对象的集合。))
history
.go(1)//往前前进一步
.go(-1)//往后后退一步
.back()//后退
.forward()//前进
document
.write(123)
.getElementById("");
.getElementsByName("");
.getElementsByTagName("");
.body
location
="";
.href="";
.replace("")
.reload();
status="";
navigator
.appName
三.核心类
String
.substring(2)
.substring(2,4)
.substr(3,5);
.indexOf('@')
.charAt(3)
.replace("","")
.length
Date
var d1 = new Date();
var d2 = new Date("yyyy/MM/dd");
.getTime();
.getYear();
.getGetFullYear();
.getMonth();
.getDate();
.getDay();
.getHours();
.getMinutes();
.getSeconds();
.getMilliSeconds();
Math
.PI
.math()
.round()
Array
.length
四.css
行内样式 <div style="">
选择器
a) id选择器
b) 类选择器
c) 标签选择器
外部样式
js操作样式
找对象.style.属性=样式值;
document.getElementById("mydiv").style.color="red";
document.body.clientWidth 肉眼看到的
document.body.scrollWidth 滚动条的
五.表单
验证
事件