摘要: text()取得所有匹配元素的内容。结果是由所有匹配元素包含的文本内容组合起来的文本。这个方法对HTML和XML文档都有效。Get the text contents of all matched elements.The result is a string that contains the combined text contents of all matched elements. Thi... 阅读全文
posted @ 2010-11-23 13:14 .雷子. 阅读(271) 评论(0) 推荐(0) 编辑
摘要: html()取得第一个匹配元素的html内容。这个函数不能用于XML文档。但可以用于XHTML文档。Get the html contents of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).返回值Str... 阅读全文
posted @ 2010-11-23 13:11 .雷子. 阅读(170) 评论(0) 推荐(0) 编辑
摘要: addClass(class)为每个匹配的元素添加指定的类名。Adds the specified class(es) to each of the set of matched elements.返回值jQuery参数class (String) : 一个或多个要添加到元素中的CSS类名,请用空格分开示例为匹配的元素加上 'selected' 类 HTML 代码:<p>Hello&l... 阅读全文
posted @ 2010-11-23 13:10 .雷子. 阅读(195) 评论(0) 推荐(0) 编辑
摘要: attr(name)取得第一个匹配元素的属性值。通过这个方法可以方便地从第一个匹配元素中获取一个属性的值。如果元素没有相应属性,则返回 undefined 。Access a property on the first matched element. This method makes it easy to retrieve a property value from the first mat... 阅读全文
posted @ 2010-11-23 13:08 .雷子. 阅读(173) 评论(0) 推荐(0) 编辑
摘要: each()each(callback)以每一个匹配的元素作为上下文来执行一个函数。意味着,每次执行传递进来的函数时,函数中的this关键字都指向一个不同的DOM元素(每次都是一个不同的匹配元素)。而且,在每次执行函数时,都会给函数传递一个表示作为执行环境的元素在匹配的元素集合中所处位置的数字值作为参数(从零开始的整形)。 返回 'false' 将停止循环 (就像在普通的循环中使用 'break'... 阅读全文
posted @ 2010-11-23 13:04 .雷子. 阅读(357) 评论(0) 推荐(1) 编辑
投入到.net、web前端开发、继续学习!