1,为什么学习jQuery javaScript缺乏跨浏览器的兼容,最少的代码做更多的事,性能,业内的一个“标准”,节省开发者学习时间,插件,让JavaScript编程变得有趣 2,jQuery选择器 基本选择器 #id element .class * , > 子代 后代 其他选择器(选择器太多不 ...
分类:
Web程序 时间:
2017-05-20 01:07:52
阅读次数:
256
核心提示:jquery选择器得到的jquery对象和标准的 javascript中的document.getElementById()取得的dom对象是两种不同的对象类型,一般情况下,如S(’#id’)得到的是jquery对象,它不能使用js中的dom方法。所以,如果jquery对象要使用标准的do ...
分类:
Web程序 时间:
2017-05-19 22:09:52
阅读次数:
232
$('#demo').find('li.error')与$('#demo').find('li .error') $('#demo').find('li.error') 在id号为demo的元素下搜索,类名为error的li标签 $('#demo').find('li. error') 在id号为d ...
分类:
Web程序 时间:
2017-05-17 20:54:19
阅读次数:
299
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.o ...
分类:
Web程序 时间:
2017-05-12 23:14:11
阅读次数:
297
jQuery本质还是封装好的js,只不过代码更简洁,而做的更好 使用JQuery选择器会返回一个jQuery对象,其本质是dom数组,jQuery对象可以调用JQuery方法. 1 基本选择器 1.1 id选择器 jquery ==> $('#btnShow'); js ==> document.g ...
分类:
Web程序 时间:
2017-05-12 11:36:30
阅读次数:
127
使用jquery获取radio的值,最重要的是掌握jquery选择器的使用,在一个表单中我们通常是要获取被选中的那个radio项的值,所以要加checked来筛选,比如有以下的一些radio项:1.<input type="radio" name="testradio" value="jquery获 ...
分类:
Web程序 时间:
2017-05-12 01:42:28
阅读次数:
223
1.基本选择器 2.层次选择器//选取ancestor元素里的所有descendant(后代)元$("ancestor descendant") 3.过滤选择器 1)基本过滤选择器 ...
分类:
Web程序 时间:
2017-05-10 22:24:28
阅读次数:
328
<!DOCTYPE html><html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title></title> <link rel="stylesheet" href="imooc. ...
分类:
Web程序 时间:
2017-05-08 23:28:31
阅读次数:
203
<!DOCTYPE html><html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title></title> <style> div { width: 100px; height: ...
分类:
Web程序 时间:
2017-05-08 23:24:09
阅读次数:
212
<html><head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title></title> <style> div { width: 100px; height: 90px; float: le ...
分类:
Web程序 时间:
2017-05-08 23:18:24
阅读次数:
269