1.javascript区分大小写,不区分大小写的html,css,sql
2.toString(),parseInt()函数
3.Date对象,getFullYear(),getMonth(),getDate()
4.创建数组 var arr=new Array();var arr=new Array[“x”,“y”];
5.函数定义 function 函数名(参数名){返回值}
6.获取当前点击元素方法 οnclick=“function(this)”;在方法中操作即可
7.DOM节点共有属性和方法
只要是访问基本都是属性:nodeName,nodeType,childNodes,firstChild,lastChild,previousSibling,nextSibling,parentNode
方法:
appendChild(node),removeChild(node),insertBefore(newNode,oldNode) xx.style.display=“none”,xx.style.cssText = “background-color:black”
8.选择元素
getElementById(“id”);getElementByClass(“class”),getElementByTagName(“name”)
9.创建元素
createElement(“标签名”),setAttribute(“属性名”,“属性值”),createTextNode(text);
10.内置对象
Window为顶层对象,window.open(网址);window.close();
Location 跳转网页location=“网址” ,location.href 获取当前网址 ;location.reload() 刷新界面
11.History对象
history.back() 返回
javascript要点总结
最新推荐文章于 2024-07-11 18:00:32 发布