本文重点解决jQuey入门问题,希望能够帮助到你
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
jQuery是一个快 轻量 丰富的JavaScript库,主要封装了四块内容,分别是:html遍历操作,事件,动画 和Ajax. 并且使用简单,丰富和易于扩展。
官网:www.jQuery.com
www.bootcdn.cn 下载jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div class="box">weather</div> <script src="jQuery/js/jquery.js"> </script> <script> console.log($('.box')) 写选择器,返回的结果是一个jQuery对象也就是一个伪数组,可以通过索引直接转换成js节点对象。 </script> </body> </html>
js对象转jquery对象
var oBox = document.getElementById('box');
console.log($(oBox));
本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。