56.js中的焦点顺序:document.getelementbyid(表单元素).tabindex = 1
57.innerhtml的值是表单元素的值:如
how are you
,则innerhtml的值就是:how are you
58.innertext的值和上面的一样,只不过不会把这种标记显示出来.
59.contenteditable可设置元素是否可被修改,iscontenteditable返回是否可修改的状态.
60.isdisabled判断是否为禁止状态.disabled设置禁止状态
61.length取得长度,返回整型数值
62.addbehavior()是一种js调用的外部函数文件其扩展名为.htc
63.window.focus()使当前的窗口在所有窗口之前.
64.blur()指失去焦点.与focus()相反.
65.select()指元素为选中状态.
66.防止用户对文本框中输入文本:onfocus=this.blur()
67.取出该元素在页面中出现的数量:document.all.tags(div(或其它html标记符)).length
68.js中分为两种窗体输出:模态和非模态.window.showmodaldialog(),window.showmodeless()
69.状态栏文字的设置:window.status='文字',默认的状态栏文字设置:window.defaultstatus = '文字.';
70.添加到收藏夹:external.addfavorite(http://www.dannyg.com/);
71.js中遇到脚本错误时不做任何操作:window.onerror = donothing; 指定错误句柄的语法为:window.onerror = handleerror;
72.js中指定当前打开窗口的父窗口:window.opener,支持opener.opener...的多重继续.
73.js中的self指的是当前的窗口
74.js中状态栏显示内容:window.status=内容
75.js中的top指的是框架集中最顶层的框架
76.js中关闭当前的窗口:window.close();
77.js中提出是否确认的框:if(confirm(are you sure?)){alert(ok);}else{alert(not ok);}
78.js中的窗口重定向:window.navigate(http://www.sina.com.cn/);
79.js中的打印:window.print()
80.js中的提示输入框:window.prompt(message,defaultreply);
81.js中的窗口滚动条:window.scroll(x,y)
82.js中的窗口滚动到位置:window.scrollby
83.js中设置时间间隔:setinterval(expr,msecdelay)或setinterval(funcref,msecdelay)或settimeout
84.js中的模态显示在ie4+行,在nn中不行:showmodaldialog(url[,arguments][,features]);
85.js中的退出之前使用的句柄:function verifyclose(){event.returnvalue=we really like you and hope you will stay longer.;}} window.onbeforeunload=verifyclose;
86.当窗体第一次调用时使用的文件句柄:onload()
87.当窗体关闭时调用的文件句柄:onunload()
88.window.location的属性: protocol(http:),hostname(http://www.example.com),port(80),host(www.example.com:80),pathname(/,指跳转到相应的锚记),href(全部的信息)
89.window.location.reload()刷新当前页面.
90.window.history.back()返回上一页,window.history.forward()返回下一页,window.history.go(返回第几页,也可以使用访问过的url)
91.document.write()不换行的输出,document.writeln()换行输出
92.document.body.nowrap=true;防止链接文字折行.
93.变量名.charat(第几位),取该变量的第几位的字符.
94.abc.charcodeat(第几个),返回第几个字符的ascii码值.
95.字符串连接:string.concat(string2),或用+=进行连接
96.变量.indexof(字符,起始位置),返回第一个出现的位置(从0开始计算)
97.string.lastindexof(searchstring[,startindex])最后一次出现的位置.
98.string.match(regexpression),判断字符是否匹配.
99.string.replace(regexpression,replacestring)替换现有字符串.
100.string.split(分隔符)返回一个数组存储值.
101.string.substr(start[,length])取从第几位到指定长度的字符串.
102.string.tolowercase()使字符串全部变为小写.
103.string.touppercase()使全部字符变为大写.
104.parseint(string[,radix(代表进制)])强制转换成整型.
105.parsefloat(string[,radix])强制转换成浮点型.
106.isnan(变量):测试是否为数值型.
107.定义常量的关键字:const,定义变量的关键字:var