jQuery 杂项 get() 方法
jQuery 教程
· 2019-03-28 18:38:13
实例
获取第一个 <p> 元素的名称和值:
$("button").click(function(){
x=$("p").get(0);
$("div").text(x.nodeName + ": " + x.innerHTML);
});
x=$("p").get(0);
$("div").text(x.nodeName + ": " + x.innerHTML);
});
定义和用法
get() 方法获取由选择器指定的 DOM 元素。
语法
$(selector).get(index)
| 参数 | 描述 |
|---|---|
| index | 可选。规定要获取哪个匹配的元素(通过 index 编号)。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
REST in Practice
Jim Webber、Savas Parastatidis、Ian Robinson / O'Reilly Media / 2010-9-24 / USD 44.99
Why don't typical enterprise projects go as smoothly as projects you develop for the Web? Does the REST architectural style really present a viable alternative for building distributed systems and ent......一起来看看 《REST in Practice》 这本书的介绍吧!