标签:uppercase confirm 链接 script jquer 只读 led str screen
//html中 substring(index1,index2);返回在index1和index2之间的字符串,不包括index2对应的字符 //java中 substring(index1,index2);返回在index1和index2之间的字符串,包括index2对应的字符 //c#中 substring(index1,length);length代表截取字符串的长度
var 数组名 = new Array(size); var 数组名 = new Array("xx","xx"); var 数组名 = new Array(2); 数组名[0]="xx"; 数组名[1]="xx";
var fruit = ["apple","orange"]; for(var i in fruit){ document.write(fruit[i]+"<br/>"); }
history | 访问过的url |
llacation | 当前的url |
screen | 只读属性 |
prompt() | |
alert() | |
confirm() | |
close() | |
open() | |
setTimeout() | |
setInterval() |
host | 设置或返回主机名、url端口号 |
hostname | 设置或返回当前url主机名 |
href | 设置或返回完整的url |
reload() | 重新加载当前文档 |
replace() | 替换当前文档 |
用法: <a href="javascript:history:back()"></a>
referrer | 返回载入当前文档的url(如果不是通过超链接访问的,则为null) |
url | |
getElementById() | |
getElementByName() | |
getElementByTagName() | |
write() | 向文档写文本、html表达式、js代码 |
var t = setInterval("renovate()",1000); var w = setTimeout("renovate()",1000); clearTimeout(w); clearInterval(t);
12.【js操作dom对象】
parentNode() | |
childNodes() | 返回集合,childNodes[i] |
firstChild() | |
lastChild() | |
nextSibling() | |
previousSibling() | |
firstElementChild() | |
lastElementChild() | |
nextElementSibling() | |
previousElementSibling() | |
nodeName | |
nodeValue | |
nodeType | |
getAttribute("") | |
setAttribute("","") | |
createElement(tagName) | tagName是标签类型 |
A.append(B) | 把B节点追加到A节点结尾 |
insertBefore(A,B) | 把A节点插入B节点前 |
cloneNode(node) | |
removeChild(node) | |
replaceChild(new,old) | |
标签:uppercase confirm 链接 script jquer 只读 led str screen
原文地址:https://www.cnblogs.com/wzdnwyyu/p/11169076.html