![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
文章平均质量分 82
Z忽忽
在职社畜
展开
-
js中setAttribute用法详解
setAttribute基本用法element.setAttribute(attributename,attributevalue)setAttribute() 方法添加指定的属性,并为其赋指定的值,看到w3c的例子document.getElementsByTagName("INPUT")[0].setAttribute("type","button");我们经常需要在JavaScript中给E...原创 2018-07-13 12:38:35 · 62122 阅读 · 2 评论 -
Ajax
1.Jquery中AJAX参数详细(1)-转 Jquery中AJAX参数详细列表: 参数名 类型 描述 url String (默认: 当前页地址) 发送请求的地址。 type String (默认: "GET") 请求方式 ("POST" 或 "GET"), 默认为 "GET"。注意:其它 HTTP 请求方法,如 PUT 和 DELETE 也可以使...转载 2018-07-20 11:21:13 · 154 阅读 · 0 评论 -
ES6中Object.assign()方法
对象的扩展 1.ES6中,对象的属性和方法可简写:对象的属性值可不写,前提是属性名已经声明; const name = "zhangsan"; const password = "2222222"; const obj = { name, password, arr:[1,2,3,4], sayName(){ ...原创 2018-07-28 10:35:02 · 939 阅读 · 0 评论