
Jquery
gt2008gt
这个作者很懒,什么都没留下…
展开
-
Jquery基础知识关于parent的用法
<script type="text/javascript">$(function(){$("#btn1").click(function(){alert($(this).parent().next().html());//this.parent()是input前面的td//this.parent().parent()获取的是tr//this.pa...原创 2012-07-04 19:57:29 · 229 阅读 · 0 评论 -
jquery实例
<script type="text/javascript"> $(fn(){$(:checkbox).click(function(){var isDisplay=this.checked; //如果选中则显示子菜单 $(this).parent.find(.detail).css("display",isDisplay?"block":"none");...原创 2012-07-04 20:30:11 · 88 阅读 · 0 评论 -
jquey练习
<input id="pwd" type="password" /><span class="Error"></span><input id="repwd" type="password" /><span class="Error">&原创 2012-07-04 21:16:47 · 86 阅读 · 0 评论 -
jquery选择器
$('div:eq(1)')为取得div元素集合中第2个项,注意为单个对象,其length为1。 $('div:nth-child(1)')为取得div元素集合中的所有第一个div,注意其为对象集合,稍后再详述。 $('tr:odd')为取得所有奇数行。 $('tr:even')为取得所有偶数行。逐行变色 $("tr:even").addClass(...原创 2012-07-04 21:19:17 · 80 阅读 · 0 评论 -
jquery--数据删除和图片预览
<script type="text/javascript">$(function(){//隔行变色$("table tr:nth-child(odd)").css("background-color","#eee");//小图片鼠标移动事件var x=5;var y=15;$("table tr td img").mousemove(functi原创 2012-07-05 11:12:33 · 196 阅读 · 0 评论 -
jquery选择器---基本选择器
基本选择器是jquery使用最频繁的选择器,它由ID,class,元素名,多个选择符组成$(function()//id匹配元素{$("#divOne").css("dispaly","block');}//元素名匹配元素{$("div span").css("dispaly","block');}//类匹配元素{$(".clsFrame.原创 2012-07-05 14:40:00 · 101 阅读 · 0 评论