您好,欢迎访问一九零五行业门户网

javascript温习的一些笔记 基础常用知识小结_javascript技巧

以下是全部内容:
2010.11.29日
1.[window.]alert();
document.alinkcolor
textstring.anchor()
navigator.appcodename
escape(hi!) 返回ascii 码
eval(x+y) 对字符串求值 x=10,y=20;eval=30
formname.elementname.focus(); 设置元素成为焦点
history.forward() 前进浏览器
date相关的函数
date.getdate() 返回 1-31间的日期
date.getday() 返回星期几 周一到周六 0-6 间的数值
date.gethours() 返回时 0-23
date.getminutes()
date.getmonth()
date.getseconds()
date.gettime() 得到时间截 从1970.1.1到现在的毫秒数
说明
{
}
date.gettimezoneoffset() 得到客户机的时差 gmt
date.getyear();
history.go();
document.linkname.hash 返回url中#后面的字符串, 相同的用法有document.links[0].hash,document.location.hash
document.history 对象
document.history.forward();
document.history.back();
document.history.go(-1), -2
location.host,linkname.host, linkname.port 返回主机名和端口
location.hostname
location.href
formname.selectname.options[index].index 返回一个选择元素的下标
isnan()检测是否为数字
stringname.italics() 设置为xie 体格式
stringname.lastindexof(‘o'); 返回一个字符在字符串串尾开始数的索引下标
stringname.link();
事件
onchange=
onclick=
onfocus=
onload=
onmouseover=
onselect=
onsubmit=
onunload= 退出文档的时候
document.open([mimetype])
window.open(url,windows name[,windowfeatures])
date.parse(jan 11,1996);
parsefloat(string)
parseint(string[,radox]);
document.fromname.passwordname
location.pathname,link.pathname,links[index].pathname
windowname.prompt(message[inputdefault]);
protocal:
about,ftp,http,mailto,news,file,javascript
math.random() 返回 0-1间的随机数
math.round(argument)四舍五入
formname.resetbuttonname
window.status
stringname.strike() 将字符转化成带删除线的字
stringname.sub() 将字符转化成下标文本格式
formname.submit() 执行与单击提交按钮相同的动作
stringname.substring(index1,index2) 取子串
stringname.sup() 转换成上标形式
target 规定一个窗口名的字符串 formname.target, forms[index].target,location.target,link.target,links[index].target
document.title 返回
标签中的中读值,没包含的话是空null
date.togmtstring() 将一个日期转换在一个时间字符串
stringname.tolowercase();
stringname.touppdercase()
window.top, window,top.framename,window.top.frames[index]最高层的浏览器窗口
navigator.useragent 浏览器标识代理
documnet.vlinkcolor 返回链接访问过的颜色值
其它类似信息

推荐信息