<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>zfms</title>
    <description>本人对java比较了解，很喜欢学习新的东西，但是没有遇到合适的公司，合适的人。。以后打算自己做网站， 最绚的技术，做最好的中国互联网公司。。</description>
    <link>http://zfms.javaeye.com</link>
    <language>UTF-8</language>
    <copyright>Copyright 2003-2008, JavaEye.com</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>JavaEye - 做最棒的软件开发交流社区</generator>
      <item>
        <title>大家谈谈用jquery的感受...</title>
        <author>zfms</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://zfms.javaeye.com">zfms</a>&nbsp;
          链接：<a href="http://zfms.javaeye.com/blog/204309" style="color:red;">http://zfms.javaeye.com/blog/204309</a>&nbsp;
          发表时间: 2008年06月16日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          自我感觉jquery是比较不错的,一是简单,二是功能也够用,三就是UI比较漂亮,四是可扩展性强,可以开发自定义插件
          <br/>
          <span style="color:red;">
            <a href="http://zfms.javaeye.com/blog/204309#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 16 Jun 2008 20:39:28 +0800</pubDate>
        <link>http://zfms.javaeye.com/blog/204309</link>
        <guid>http://zfms.javaeye.com/blog/204309</guid>
      </item>
      <item>
        <title>JQuery应用实例学习(强烈推荐)转载</title>
        <author>zfms</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://zfms.javaeye.com">zfms</a>&nbsp;
          链接：<a href="http://zfms.javaeye.com/blog/190968" style="color:red;">http://zfms.javaeye.com/blog/190968</a>&nbsp;
          发表时间: 2008年05月08日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p style="text-indent: 2em;">jQuery 是继 prototype 之后又一个优秀的 Javascript 框架。其宗旨是&mdash;写更少的代码,做更多的事情。它是轻量级的 js 库(压缩后只有21k) ，这是其它的 js 库所不及的，它兼容 CSS3，还兼容各种浏览器（IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+）。 jQuery 是一个快速的，简洁的 javaScript 库，使用户能更方便地处理 HTML documents、events、实现动画效果，并且方便地为网站提供 AJAX 交互。 jQuery 还有一个比较大的优势是，它的文档说明很全，而且各种应用也说得很详细，同时还有许多成熟的插件可供选择。 jQuery 能够使用户的 html 页保持代码和 html 内容分离，也就是说，不用再在 html 里面插入一堆js来调用命令了，只需定义 id 即可。特推荐在<a href="http://www.kollermedia.at/">Kollermedia.at</a>上一篇JQuery插件列表的<a href="http://www.kollermedia.at/archive/2007/11/21/the-ultimate-jquery-plugin-list/">文章</a>如下：</p>
<p style="text-indent: 2em;">文件上传(File upload)</p>
<p style="text-indent: 2em;"><a href="http://www.phpletter.com/Demo/AjaxFileUpload-Demo/">Ajax File Upload</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.pixeline.be/experiments/jqUploader/">jQUploader</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.fyneworks.com/jquery/multiple-file-upload/">Multiple File Upload plugin</a>. </p>
<p style="text-indent: 2em;"><a href="http://www.appelsiini.net/projects/filestyle">jQuery File Style</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/plugins/project/InputFileCSS">Styling an input type file</a>.</p>
<p style="text-indent: 2em;"><a href="http://digitalbush.com/projects/progress-bar-plugin">Progress Bar Plugin</a>.</p>
<p style="text-indent: 2em;">表单验证(Form Validation)</p>
<p style="text-indent: 2em;"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validation</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.dyve.net/jquery/?autohelp">Auto Help</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.willjessup.com/sandbox/jquery/form_validator/form_validate.html">Simple jQuery form validation</a>.</p>
<p style="text-indent: 2em;"><a href="http://letmehaveblog.blogspot.com/2007/08/easy-client-side-web-forms-validations.html">jQuery XAV - form validations</a>.</p>
<p style="text-indent: 2em;"><a href="http://itgroup.com.ph/alphanumeric/">jQuery AlphaNumeric</a>.</p>
<p style="text-indent: 2em;"><a href="http://digitalbush.com/projects/masked-input-plugin">Masked Input</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.dennydotnet.com/post/TypeWatch-jQuery-Plugin.aspx">TypeWatch Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/plugins/project/TextLimiter">Text limiter for form fields</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.shawngo.com/gafyd/index.html">Ajax Username Check with jQuery</a>.</p>
<p style="text-indent: 2em;">表单－选取框(Form - Select Box stuff)</p>
<p style="text-indent: 2em;"><a href="http://jquery.sanchezsalvador.com/page/jquerycombobox.aspx">jQuery Combobox</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ajaxray.com/blog/2007/11/08/jquery-controlled-dependent-or-cascading-select-list-2/">jQuery controlled dependent (or Cascadign) Select List</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.google.com/p/jqmultiselects/">Multiple Selects</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/select/">Select box manipulation</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.google.com/p/jqueryselectcombo/">Select Combo Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.msxhost.com/jquery/linked-selects/json/%20target=">jQuery - LinkedSelect</a></p>
<p style="text-indent: 2em;"><a href="http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/">Auto-populate multiple select boxes</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.sitespotting.it/esempi/002/">Choose Plugin (Select Replacement)</a>.</p>
<p style="text-indent: 2em;">表单基本、输入框、选择框等(Form Basics, Input Fields, Checkboxes etc.)</p>
<p style="text-indent: 2em;"><a href="http://www.malsup.com/jquery/form/">jQuery Form Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.handlino.com/wiki/jquery-form">jQuery-Form</a>.</p>
<p style="text-indent: 2em;"><a href="http://envero.org/jlook/">jLook Nice Forms</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.whitespace-creative.com/jquery/jNice/">jNice</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.brainfault.com/2007/07/07/pin-plugin-reloaded/">Ping Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://grzegorz.frydrychowicz.net/jquery_toggleformtext/">Toggle Form Text</a>.</p>
<p style="text-indent: 2em;"><a href="http://thoughts.kuzemchak.net/entry/toggleval-for-jquery/">ToggleVal</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.pengoworks.com/workshop/jquery/field.plugin.htm">jQuery Field Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.befruit.com/">jQuery Form&rsquo;n Field plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/checkboxes/">jQuery Checkbox manipulation</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.alcoholwang.cn/jquery/jTaggingDemo.htm">jTagging</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.google.com/p/labelcheck/">jQuery labelcheck</a>.</p>
<p style="text-indent: 2em;"><a href="http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/">Overlabel</a>.</p>
<p style="text-indent: 2em;"><a href="http://blog.amicoimmaginario.it/2007/08/28/jquery-plugin-3-state-radio-buttons/">3 state radio buttons</a>.</p>
<p style="text-indent: 2em;"><a href="http://sanisoft-demo.com/jquery/plugins/shiftcheckbox/">ShiftCheckbox jQuery Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://digitalbush.com/projects/watermark-input-plugin">Watermark Input</a>.</p>
<p style="text-indent: 2em;"><a href="http://kawika.org/jquery/checkbox/">jQuery Checkbox (checkboxes with imags)</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.softwareunity.com/sandbox/jqueryspinbtn/">jQuery SpinButton Control</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.phpletter.com/form_builder/demo.html">jQuery Ajax Form Builder</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/focusfields/">jQuery Focus Fields</a>.</p>
<p style="text-indent: 2em;"><a href="http://home.iprimus.com.au/kbwood/jquery/timeEntry.html">jQuery Time Entry</a>.</p>
<p style="text-indent: 2em;">时间、日期和颜色选取(Time, Date and Color Picker)</p>
<p style="text-indent: 2em;"><a href="http://marcgrabanski.com/code/ui-datepicker/">jQuery UI Datepicker</a>.</p>
<p style="text-indent: 2em;"><a href="http://kelvinluck.com/assets/jquery/datePicker/">jQuery date picker plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.google.com/p/jquery-timepicker/">jQuery Time Picker</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/timepicker/">Time Picker</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.oakcitygraphics.com/jquery/clockpick/ClockPick.cfm">ClickPick</a>.</p>
<p style="text-indent: 2em;"><a href="http://labs.perifer.se/timedatepicker/">TimePicker</a>.</p>
<p style="text-indent: 2em;"><a href="http://acko.net/dev/farbtastic">Farbtastic jQuery Color Picker Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.intelliance.fr/jquery/color_picker/">Color Picker by intelliance.fr</a>.</p>
<p style="text-indent: 2em;">投票插件(Rating Plugins)</p>
<p style="text-indent: 2em;"><a href="http://www.phpletter.com/Demo/Jquery-Star-Rating-Plugin/#">jQuery Star Rating Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.m3nt0r.de/devel/raterDemo/">jQuery Star Rater</a>.</p>
<p style="text-indent: 2em;"><a href="http://riderdesign.com/articles/displayarticle.aspx?articleid=21">Content rater with asp.net, ajax and jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.learningjquery.com/2007/05/half-star-rating-plugin">Half-Star Rating Plugin</a>.</p>
<p style="text-indent: 2em;">搜索插件(Search Plugins)</p>
<p style="text-indent: 2em;"><a href="http://www.vulgarisoip.com/2007/08/06/jquerysuggest-11/">jQuery Suggest</a>.</p>
<p style="text-indent: 2em;"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/">jQuery Autocomplete</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.pengoworks.com/workshop/jquery/autocomplete.htm">jQuery Autocomplete Mod</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ajaxdaddy.com/demo-jquery-autocomplete.html">jQuery Autocomplete by AjaxDaddy</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.reach1to1.net/saurabh/jplugins/autocomplete/">jQuery Autocomplete Plugin with HTML formatting</a>.</p>
<p style="text-indent: 2em;"><a href="http://interface.eyecon.ro/docs/autocomplete">jQuery Autocompleter</a>.</p>
<p style="text-indent: 2em;"><a href="http://nodstrum.com/2007/09/19/autocompleter/">AutoCompleter (Tutorial with PHP&amp;MySQL)</a>.</p>
<p style="text-indent: 2em;"><a href="http://rikrikrik.com/jquery/quicksearch/">quick Search jQuery Plugin</a>.</p>
<p style="text-indent: 2em;">编辑器(Inline Edit &amp; Editors)</p>
<p style="text-indent: 2em;"><a href="http://www.jaysalvat.com/jquery/jtageditor/">jTagEditor</a>.</p>
<p style="text-indent: 2em;"><a href="http://demo.wymeditor.org/demo.html">WYMeditor</a>.</p>
<p style="text-indent: 2em;"><a href="http://garage.pimentech.net/scripts_doc_jquery_jframe/">jQuery jFrame</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.appelsiini.net/projects/jeditable">Jeditable - edit in place plugin for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.dyve.net/jquery/?editable">jQuery editable</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.jdempster.com/category/jquery/disableTextSelect/">jQuery Disable Text Select Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://15daysofjquery.com/edit-in-place-with-ajax-using-jquery-%20-library/15/">Edit in Place with Ajax using jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://davehauenstein.com/blog/archives/28">jQuery Plugin - Another In-Place Editor</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.iceburg.net/jquery/tableEditor/demo.php">TableEditor</a>.</p>
<p style="text-indent: 2em;"><a href="http://joshhundley.com/teditable-in-place-editing-for-tables/">tEditable - in place table editing for jQuery</a>.</p>
<p style="text-indent: 2em;">多媒体、视频、Flash等(Audio, Video, Flash, SVG, etc)</p>
<p style="text-indent: 2em;"><a href="http://www.contentwithstructure.com/extras/jmedia">jMedia - accessible multi-media embedding</a>.</p>
<p style="text-indent: 2em;"><a href="http://sourceforge.net/projects/jbedit/">JBEdit - Ajax online Video Editor</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.sean-o.com/jquery/jmp3/">jQuery MP3 Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://malsup.com/jquery/media/">jQuery Media Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.lukelutman.com/plugins/flash/index.html">jQuery Flash Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.solitude.dk/archives/embedquicktime/">Embed QuickTime</a>.</p>
<p style="text-indent: 2em;"><a href="http://keith-wood.name/svg.html">SVG Integration</a>.</p>
<p style="text-indent: 2em;">图片(Photos/Images/Galleries)</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/demo/thickbox/">ThickBox</a>.</p>
<p style="text-indent: 2em;"><a href="http://leandrovieira.com/projects/jquery/lightbox/">jQuery lightBox plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://blog.joshuaeichorn.com/archives/2007/01/11/jquery-image-strip/">jQuery Image Strip</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html">jQuery slideViewer</a>.</p>
<p style="text-indent: 2em;"><a href="http://benjaminsterling.com/2007/09/09/jquery-jqgalscroll-photo-gallery/">jQuery jqGalScroll 2.0</a>.</p>
<p style="text-indent: 2em;"><a href="http://benjaminsterling.com/2007/10/02/jquery-jqgalviewii-photo-gallery/">jQuery - jqGalViewII</a>.</p>
<p style="text-indent: 2em;"><a href="http://benjaminsterling.com/2007/10/21/jqgalviewiii-proof-of-concept/">jQuery - jqGalViewIII</a>.</p>
<p style="text-indent: 2em;"><a href="http://opiefoto.com/articles/photoslider">jQuery Photo Slider</a>.</p>
<p style="text-indent: 2em;"><a href="http://joanpiedra.com/jquery/thumbs/">jQuery Thumbs - easily create thumbnails</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/jQIR/">jQuery jQIR Image Replacement</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.gmarwaha.com/jquery/jcarousellite/index.php#what">jCarousel Lite</a>.</p>
<p style="text-indent: 2em;"><a href="http://projects.sevir.org/storage/jpanview/index.html">jQPanView</a>.</p>
<p style="text-indent: 2em;"><a href="http://sorgalla.com/projects/jcarousel/#Examples">jCarousel</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.intelliance.fr/jquery/imagebox/">Interface Imagebox</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.getintothis.com/blog/2006/10/12/image-gallery-using-jquery-interface-reflections/">Image Gallery using jQuery, Interface &amp; Reflactions</a>.</p>
<p style="text-indent: 2em;"><a href="http://realazy.org/lab/jquery/j-gallery/">simple jQuery Gallery</a>.</p>
<p style="text-indent: 2em;"><a href="http://chicagosocial.com/gallery/">jQuery Gallery Module</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.eogallery.com/">EO Gallery</a>.</p>
<p style="text-indent: 2em;"><a href="http://flesler.blogspot.com/search/label/jQuery.ScrollShow">jQuery ScrollShow</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.malsup.com/jquery/cycle/">jQuery Cycle Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.projectatomic.com/en/flickr.htm">jQuery Flickr</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.appelsiini.net/2007/9/lazy-load-images-jquery-plugin">jQuery Lazy Load Images Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.sunsean.com/zoomi/">Zoomi - Zoomable Thumbnails</a>.</p>
<p style="text-indent: 2em;"><a href="http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-and-pluck/#crop">jQuery Crop - crop any image on the fly</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/plugins/project/reflection">Image Reflection</a>.</p>
<p style="text-indent: 2em;">Google地图（Google Map）</p>
<p style="text-indent: 2em;"><a href="http://www.dyve.net/jquery/?googlemaps">jQuery Plugin googlemaps</a>.</p>
<p style="text-indent: 2em;"><a href="http://code.google.com/p/jmaps/">jMaps jQuery Maps Framework</a>.</p>
<p style="text-indent: 2em;"><a href="http://projects.sevir.org/storage/jqmaps/index.html">jQmaps</a>.</p>
<p style="text-indent: 2em;"><a href="http://olbertz.de/jquery/googlemap.html#">jQuery &amp; Google Maps</a>.</p>
<p style="text-indent: 2em;"><a href="http://snippets.dzone.com/posts/show/4361">jQuery Maps Interface forr Google and Yahoo maps</a>.</p>
<p style="text-indent: 2em;"><a href="http://webrocket.ulmb.com/jmaps/">jQuery J Maps - by Tane Piper</a>.</p>
<p style="text-indent: 2em;">游戏(Games)</p>
<p style="text-indent: 2em;"><a href="http://fmarcia.info/jquery/tetris/tetris.html">Tetris with jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://64squar.es/">jQuery Chess</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.bennadel.com/blog/623-jQuery-Demo-Mad-Libs-Word-Game.htm">Mad Libs Word Game</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.alexatnet.com/node/68">jQuery Puzzle</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.willjessup.com/sandbox/jquery/solar_system/rotator.html">jQuery Solar System (not a game but awesome jQuery Stuff)</a>.</p>
<p style="text-indent: 2em;">表格等(Tables, Grids etc.)</p>
<p style="text-indent: 2em;"><a href="http://docs.jquery.com/Plugins/Tablesorter">UI/Tablesorter</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.reconstrukt.com/ingrid/">jQuery ingrid</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.trirand.com/blog/?p=13">jQuery Grid Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://ideamill.synaptrixgroup.com/jquery/tablefilter/tabletest.htm">Table Filter - awesome!</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.iceburg.net/jquery/tableEditor/demo.php">TableEditor</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.hanpau.com/jquery/unobtrusivetreetable.php">jQuery Tree Tables</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.javascripttoolbox.com/jquery/#expandablerows">Expandable &ldquo;Detail&rdquo; Table Rows</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.remotesynthesis.com/blog/index.cfm/2007/9/25/Sortable-Table-ColdFusion-Custom-Tag-with-jQueryUI">Sortable Table ColdFusion Costum Tag with jQuery UI</a>.</p>
<p style="text-indent: 2em;"><a href="http://flesler.blogspot.com/2007/10/jquerybubble.html">jQuery Bubble</a>.</p>
<p style="text-indent: 2em;"><a href="http://tablesorter.com/docs/">TableSorter</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.webtoolkit.info/demo/jquery/scrollable/demo.html">Scrollable HTML Table</a>.</p>
<p style="text-indent: 2em;"><a href="http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html">jQuery column Manager Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://p.sohei.org/stuff/jquery/tablehover/demo/demo.html">jQuery tableHover Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://p.sohei.org/stuff/jquery/columnhover/demo/demo.html">jQuery columnHover Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://makoomba.altervista.org/grid/">jQuery Grid</a>.</p>
<p style="text-indent: 2em;"><a href="http://motherrussia.polyester.se/jquery-plugins/tablesorter/">TableSorter plugin for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://joshhundley.com/teditable-in-place-editing-for-tables/">tEditable - in place table editing for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.hovinne.com/dev/jquery/chartotable/">jQuery charToTable Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ita.es/jquery/jquery.grid.columnSizing.htm">jQuery Grid Column Sizing</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ita.es/jquery/jquery.grid.rowSizing.htm">jQuery Grid Row Sizing</a>.</p>
<p style="text-indent: 2em;">统计图(Charts, Presentation etc.)</p>
<p style="text-indent: 2em;"><a href="http://worcesterwideweb.com/2007/06/04/jquery-wizard-plugin/">jQuery Wizard Plugin </a>.</p>
<p style="text-indent: 2em;"><a href="http://www.reach1to1.com/sandbox/jquery/jqchart/">jQuery Chart Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://ejohn.org/apps/speed/">Bar Chart</a>.</p>
<p style="text-indent: 2em;">边框、圆角、背景(Border, Corners, Background)</p>
<p style="text-indent: 2em;"><a href="http://www.malsup.com/jquery/corner/">jQuery Corner</a>.</p>
<p style="text-indent: 2em;"><a href="http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery">jQuery Curvy Corner</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.jquery.com/%7Epaul/plugins/nifty/example.html">Nifty jQuery Corner</a>.</p>
<p style="text-indent: 2em;"><a href="http://illandril.net/jQuery/transparentCorners/">Transparent Corners</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.methvin.com/jquery/jq-corner.html">jQuery Corner Gallery</a>.</p>
<p style="text-indent: 2em;"><a href="http://blog.brandonaaron.net/my-jquery-plugins/gradient/">Gradient Plugin</a>.</p>
<p style="text-indent: 2em;">文字和超链接(Text and Links)</p>
<p style="text-indent: 2em;"><a href="http://wanderinghorse.net/computing/%20/jquery/spoilers/demo.html">jQuery Spoiler plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://johannburkard.de/blog/programming/%20/highlight-%20-text-higlighting-jquery-plugin.html">Text Highlighting</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.jdempster.com/category/jquery/disableTextSelect/">Disable Text Select Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/newsticker/">jQuery Newsticker</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ollicle.com/2007/jun/03/jquery_lineheight_flexible.html">Auto line-height Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://agencenp.net/textgrad/textgrad.html">Textgrad - a text gradient plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://kawika.org/jquery/linklook/">LinkLook - a link thumbnail preview</a>.</p>
<p style="text-indent: 2em;"><a href="http://rikrikrik.com/jquery/pager/#examples">pager jQuery Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://rikrikrik.com/jquery/shortkeys/">shortKeys jQuery Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ollicle.com/eg/jquery/biggerlink">jQuery Biggerlink</a>.</p>
<p style="text-indent: 2em;"><a href="http://troy.dyle.net/linkchecker/">jQuery Ajax Link Checker</a>.</p>
<p style="text-indent: 2em;">鼠标提示（Tooltips）</p>
<p style="text-indent: 2em;"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/">jQuery Plugin - Tooltip</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.codylindley.com/blogstuff/js/jtip/">jTip - The jQuery Tool Tip</a>.</p>
<p style="text-indent: 2em;"><a href="http://examples.learningjquery.com/62/demo/index.html#examplesection">clueTip</a>.</p>
<p style="text-indent: 2em;"><a href="http://edgarverle.com/BetterTip/default.cfm">BetterTip</a>.</p>
<p style="text-indent: 2em;"><a href="http://ioreader.com/2007/05/15/flash-tooltips-using-jquery/">Flash Tooltips using jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.texotela.co.uk/code/jquery/tooltipdemo/">ToolTip</a>.</p>
<p style="text-indent: 2em;">菜单和导航(Menus, Navigations)</p>
<p style="text-indent: 2em;"><a href="http://stilbuero.de/jquery/tabs_3/">jQuery Tabs Plugin - awesome! </a>. [<a href="http://stilbuero.de/jquery/tabs_3/nested.html">demo nested tabs</a>.]</p>
<p style="text-indent: 2em;"><a href="http://blog.cutterscrossing.com/index.cfm/2007/6/15/Updated-JQuery-Nested-Tab-Set-with-Demo">another jQuery nested Tab Set example (based on jQuery Tabs Plugin)</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.sunsean.com/idTabs/">jQuery idTabs</a>.</p>
<p style="text-indent: 2em;"><a href="http://jdsharp.us/jQuery/plugins/jdMenu/">jdMenu - Hierarchical Menu Plugin for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://be.twixt.us/jquery/suckerFish.php">jQuery SuckerFish Style</a>.</p>
<p style="text-indent: 2em;"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-treeview/">jQuery Plugin Treeview</a>.</p>
<p style="text-indent: 2em;"><a href="http://be.twixt.us/jquery/treeView.php">treeView Basic</a>.</p>
<p style="text-indent: 2em;"><a href="http://labs.activespotlight.net/jQuery/menu_demo.html">FastFind Menu</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.getintothis.com/blog/2006/09/26/my-first-jquery-plugin-a-sliding-menu/">Sliding Menu</a>.</p>
<p style="text-indent: 2em;"><a href="http://gmarwaha.com/blog/?p=7">Lava Lamp jQuery Menu</a>.</p>
<p style="text-indent: 2em;"><a href="http://icon.cat/wiki/IconDock_En#iconDock_jQuery_Plugin">jQuery iconDock</a>.</p>
<p style="text-indent: 2em;"><a href="http://cherne.net/brian/resources/jquery.variations.html">jVariations Control Panel</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.trendskitchens.co.nz/jquery/contextmenu/">ContextMenu plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://p.sohei.org/jquery-plugins/clickmenu/">clickMenu</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ndesign-studio.com/blog/mac/css-dock-menu">CSS Dock Menu</a>.</p>
<p style="text-indent: 2em;"><a href="http://webexpose.org/2006/12/28/jquery-pop-up-menu-tutorial/">jQuery Pop-up Menu Tutorial</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.getintothis.com/blog/2006/09/26/my-first-jquery-plugin-a-sliding-menu/">Sliding Menu</a>.</p>
<p style="text-indent: 2em;"><a href="http://stilbuero.de/jquery/tabs_3/">http://stilbuero.de/jquery/tabs_3/</a></p>
<p style="text-indent: 2em;">幻灯、翻转等(Accordions, Slide and Toggle stuff)</p>
<p style="text-indent: 2em;"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-accordion/">jQuery Plugin Accordion</a>.</p>
<p style="text-indent: 2em;"><a href="http://fmarcia.info/jquery/accordion.html">jQuery Accordion Plugin Horizontal Way</a>.</p>
<p style="text-indent: 2em;"><a href="http://letmehaveblog.blogspot.com/2007/10/haccordion-simple-horizontal-accordion.html">haccordion - a simple horizontal accordion plugin for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.portalzine.de/index?/Horizontal_Accordion--print">Horizontal Accordion by portalzine.de</a>.</p>
<p style="text-indent: 2em;"><a href="http://berndmatzner.de/jquery/hoveraccordion/">HoverAccordion</a>.</p>
<p style="text-indent: 2em;"><a href="http://fmarcia.info/jquery/accordion.html">Accordion Example from fmarcia.info</a>.</p>
<p style="text-indent: 2em;"><a href="http://blog.evaria.com/wp-content/themes/blogvaria/jquery/index.php">jQuery Accordion Example</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/files/demo/dl-done.html">jQuery Demo - Expandable Sidebar Menu</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.andreacfm.com/examples/jQpanels/">Sliding Panels for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.andreaseberhard.de/toggleElements/">jQuery ToggleElements</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ndoherty.com/demos/coda-slider/">Coda Slider</a>.</p>
<p style="text-indent: 2em;"><a href="http://sorgalla.com/projects/jcarousel/#Examples">jCarousel</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.reindel.com/accessible_news_slider/">Accesible News Slider Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://icant.co.uk/sandbox/jquerycodeview/">Showing and Hiding code Examples</a>.</p>
<p style="text-indent: 2em;"><a href="http://gsgd.co.uk/sandbox/jquery/easing/">jQuery Easing Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://sonspring.com/journal/jquery-portlets">jQuery Portlets</a>.</p>
<p style="text-indent: 2em;"><a href="http://jdsharp.us/jQuery/plugins/AutoScroll/">AutoScroll</a>.</p>
<p style="text-indent: 2em;"><a href="http://medienfreunde.com/lab/innerfade/">Innerfade</a>.</p>
<p style="text-indent: 2em;">拖放插件(Drag and Drop)</p>
<p style="text-indent: 2em;"><a href="http://docs.jquery.com/UI/Draggables">UI/Draggables</a>.</p>
<p style="text-indent: 2em;"><a href="http://fromvega.com/wordpress/2007/07/14/easydrag-jquery-plugin/">EasyDrag jQuery Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://sonspring.com/journal/jquery-portlets">jQuery Portlets</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.iceburg.net/jquery/jqDnR/">jqDnR - drag, drop resize</a>.</p>
<p style="text-indent: 2em;"><a href="http://interface.eyecon.ro/demos/drag.html">Drag Demos</a>.</p>
<p style="text-indent: 2em;">XML XSL JSON Feeds</p>
<p style="text-indent: 2em;"><a href="http://www.jongma.org/webtools/jquery/xslt/">XSLT Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://cgaskell.wordpress.com/2006/11/02/jquery-ajax-call-and-result-xml-parsing/">jQuery Ajax call and result XML parsing</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/plugins/project/xmlObjectifier">xmlObjectifier - Converts XML DOM to JSON</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.glyphix.com/">jQuery XSL Transform</a>.</p>
<p style="text-indent: 2em;"><a href="http://malsup.com/jquery/taconite/">jQuery Taconite - multiple Dom updates</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.hovinne.com/blog/index.php/2007/07/15/132-jfeed-jquery-rss-atom-feed-parser-plugin">RSS/ATOM Feed Parser Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.malsup.com/jquery/gfeed/">jQuery Google Feed Plugin</a>.</p>
<p style="text-indent: 2em;">浏览器(Browserstuff)</p>
<p style="text-indent: 2em;"><a href="http://noteslog.com/post/how-to-fix-the-resize-event-in-ie/">Wresize - IE Resize event Fix Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.khurshid.com/ifixpng.php">jQuery ifixpng</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.andreaseberhard.de/pngFix/">jQuery pngFix</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.crismancich.de/jquery/plugins/linkscrubber/">Link Scrubber - removes the dotted line onfocus from links</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.matthewjrichards.co.uk/articles/2007/06/25/jquery-perciformes-the-entire-suckerfish-familly-under-one-roof">jQuery Perciformes - the entire suckerfish familly under one roof</a>.</p>
<p style="text-indent: 2em;"><a href="http://blog.brandonaaron.net/my-jquery-plugins/background-iframe/">Background Iframe</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/plugins/project/QinIE">QinIE - for proper display of Q tags in IE</a>.</p>
<p style="text-indent: 2em;"><a href="http://webrocket.ulmb.com/ability/">jQuery Accessibility Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ogonek.net/mousewheel/jquery-demo.html">jQuery MouseWheel Plugin</a>.</p>
<p style="text-indent: 2em;">对话框、确认窗口(Alert, Prompt, Confirm Windows)</p>
<p style="text-indent: 2em;"><a href="http://trentrichardson.com/Impromptu/">jQuery Impromptu</a>.</p>
<p style="text-indent: 2em;"><a href="http://nadiaspot.com/jquery/confirm">jQuery Confirm Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://dev.iceburg.net/jquery/jqModal/">jqModal</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.ericmmartin.com/projects/simplemodal/">SimpleModal</a>.</p>
<p style="text-indent: 2em;">CSS</p>
<p style="text-indent: 2em;"><a href="http://www.kelvinluck.com/article/switch-stylesheets-with-jquery">jQuery Style Switcher</a>.</p>
<p style="text-indent: 2em;"><a href="http://andykent.bingodisk.com/bingo/public/jss/">JSS - Javascript StyleSheets</a>.</p>
<p style="text-indent: 2em;"><a href="http://flesler.blogspot.com/2007/11/jqueryrule.html">jQuery Rule - creation/manipulation of CSS Rules</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.designerkamal.com/jPrintArea/">jPrintArea</a>.</p>
<p style="text-indent: 2em;">DOM、AJAX和其它JQuery插件（DOM, Ajax and other jQuery plugins）</p>
<p style="text-indent: 2em;"><a href="http://flydom.socianet.com/">FlyDOM</a>.</p>
<p style="text-indent: 2em;"><a href="http://brandonaaron.net/docs/dimensions/#getting-started">jQuery Dimenion Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://happygiraffe.net/blog/articles/2007/09/26/jquery-logging">jQuery Loggin</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.com/plugins/project/metadata">Metadata - extract metadata from classes, attributes, elements</a>.</p>
<p style="text-indent: 2em;"><a href="http://johannburkard.de/blog/programming/%20/inc-a-super-tiny-client-side-include-%20-jquery-plugin.html">Super-tiny Client-Side Include Javascript jQuery Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://humanized.com/weblog/2007/09/14/undo-made-easy-with-ajax-part-1/">Undo Made Easy with Ajax</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.jasons-toolbox.com/JHeartbeat/">JHeartbeat - periodically poll the server</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.appelsiini.net/projects/lazyload">Lazy Load Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/">Live Query</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquery.offput.ca/every/">jQuery Timers</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.joanpiedra.com/jquery/shareit/">jQuery Share it - display social bookmarking icons</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.jdempster.com/category/code/jquery/cookiejar/">jQuery serverCookieJar</a>.</p>
<p style="text-indent: 2em;"><a href="http://ideamill.synaptrixgroup.com/?p=3">jQuery autoSave</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.semicomplete.com/blog/geekery/jquery-interface-puffer.html">jQuery Puffer</a>.</p>
<p style="text-indent: 2em;"><a href="http://33rockers.com/jquery/iframe-demo/">jQuery iFrame Plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.stilbuero.de/2006/09/17/%20-plugin-for-jquery/">Cookie Plugin for jQuery</a>.</p>
<p style="text-indent: 2em;"><a href="http://leftlogic.com/lounge/articles/jquery_spy2">jQuery Spy - awesome plugin</a>.</p>
<p style="text-indent: 2em;"><a href="http://www.learningjquery.com/2007/01/effect-delay-trick">Effect Delay Trick</a>.</p>
<p style="text-indent: 2em;"><a href="http://jquick.sullof.com/jquick/">jQuick - a quick tag creator for jQuery</a>.</p>
<p style="text-indent: 2em;">Metaobjects.</p>
<p style="text-indent: 2em;"><a href="http://www.thunderguy.com/semicolon/2007/08/14/elementready-jquery-plugin/">elementReady</a>.</p>
          <br/>
          <span style="color:red;">
            <a href="http://zfms.javaeye.com/blog/190968#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 08 May 2008 11:02:41 +0800</pubDate>
        <link>http://zfms.javaeye.com/blog/190968</link>
        <guid>http://zfms.javaeye.com/blog/190968</guid>
      </item>
      <item>
        <title>jquery使用手册(附件包括所有内容)</title>
        <author>zfms</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://zfms.javaeye.com">zfms</a>&nbsp;
          链接：<a href="http://zfms.javaeye.com/blog/190951" style="color:red;">http://zfms.javaeye.com/blog/190951</a>&nbsp;
          发表时间: 2008年05月08日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><span style="font-size: x-small;">&nbsp;jQuery是一款同prototype一样优秀js开发库类，特别是对css和XPath的支持，使我们写js变得更加方便！如果你不是个js高手又想写出优 秀的js效果，jQuery可以帮你达到目的！<br />&nbsp;&nbsp; 下载地址：Starterkit （</span><a href="http://jquery.bassistance.de/jquery-starterkit.zip"><span style="font-size: 10pt;"><span style="color: #1d58d1;">http://jquery.bassistance.de/jquery-starterkit.zip</span></span></a><span style="font-size: 10pt;">）<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jQuery Downloads （</span><a href="http://jquery.com/src/"><span style="font-size: 10pt;"><span style="color: #1d58d1;">http://jquery.com/src/</span></span></a><span style="font-size: 10pt;">）</span></p>
<p>&nbsp;&nbsp; <span style="font-size: 10pt;">下载完成后先加载到文档中，然后我们来看个简单的例子！</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">&lt;</span><span style="color: #000000;">script language</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">javascript</span><span style="color: #000000;">"</span><span style="color: #000000;"> type</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">text/javascript</span><span style="color: #000000;">"</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; $(document).ready(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">a</span><span style="color: #000000;">"</span><span style="color: #000000;">).click(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(</span><span style="color: #000000;">"</span><span style="color: #000000;">Hello world!</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />&nbsp;&nbsp;&nbsp; });<br />});<br /></span><span style="color: #000000;">&lt;</span><span style="color: #000000;">script</span><span style="color: #000000;">&gt;</span></div>
<p>&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: 10pt;">上边的效果是点击文档中所有a标签时将弹出对话框，$("a") 是一个jQuery选择器，$本身表示一个jQuery类，所有$()是构造一个jQuery对象，click()是这个对象的方法，同理$(document)也是一个jQuery对象，ready(fn)是$(document)的方法，表示当document全部下载完毕时执行函数。<br />&nbsp;&nbsp;&nbsp;&nbsp; 在进行下面内容之前我还要说明一点$("p")和$("#p")的区别,$("p")表示取所有p标签(&lt;p&gt;&lt;/p&gt;)的元素,$("#p")表示取id为"p"(&lt;span id="p"&gt;&lt;/span&gt;)的元素.</span></p>
<p><span style="font-size: 10pt;">我将从以下几个内容来讲解jQuery的使用:<br />1:核心部分<br />2:DOM操作<br />3:css操作<br />4:javascript处理<br />5:动态效果<br />6:event事件 <br />7:ajax支持 <br />8:插件程序</span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="text-decoration: underline;"><strong style="font-size: 18pt;">一：核心部分</strong></span><br /><span style="font-size: 12pt;"><strong style="font-size: 12pt; color: red;">$(expr)<br /></strong></span><span style="font-size: 10pt;">说明：该函数可以通过css选择器，Xpath或html代码来匹配目标元素，所有的jQuery操作都以此为基础<br />参数：expr：字符串，一个查询表达式或一段html字符串<br /><strong>例子：</strong><br />未执行jQuery前：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">one</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">two</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;<br />&nbsp;&nbsp;&nbsp; &lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">three</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"> <br /></span><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #ff0000;"> </span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><br /><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">div &gt; p</span><span style="color: #000000;">"</span><span style="color: #000000;">).html());&nbsp;&nbsp;<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，弹出对话框文字为two，即div标签下p元素的内容</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;</span><span style="color: #000000;">"</span><span style="color: #000000;">).appendTo(</span><span style="color: #000000;">"</span><span style="color: #000000;">body</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，向body中添加&ldquo;&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;&rdquo;</span><br /><br /><span style="font-size: 12pt;"><strong style="color: red;">$(elem)</strong></span><br /><span style="font-size: 10pt;">说明：限制jQuery作用于一个特定的dom元素，这个函数也接受xml文档和windows对象<br />参数： elem：通过jQuery对象压缩的DOM元素<br />例子：<br />未执行jQuery前：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">one</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">two</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">three</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(document).find(</span><span style="color: #000000;">"</span><span style="color: #000000;">div &gt; p</span><span style="color: #000000;">"</span><span style="color: #000000;">).html());<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，弹出对话框文字为two，即div标签下p元素的内容</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp; $(document.body).background(</span><span style="color: #000000;">"</span><span style="color: #000000;">black</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，背景色变成黑色<br /></span><br /><span style="font-size: 12pt;"><strong style="color: red;"><span style="font-size: 12pt;">$(elems)</span><br /></strong><span style="font-size: small;"><span style="font-size: 10pt;">说明：限制jQuery作用于一组特定的DOM元素<br />参数： elem：一组通过jQuery对象压缩的DOM元素<br />例子：<br />未执行jQuery前：</span> </span></span><span style="font-size: 10pt;">运行：当点击id为test的元素时，隐藏form1表单中的所有元素。</span><br /><br /><span style="font-size: 12pt;"><strong style="color: red;"><span style="font-size: 12pt;">$(fn)</span><br /></strong><span style="font-size: small;"><span style="font-size: 10pt;">说明：$(document).ready()的一个速记方式，当文档全部载入时执行函数。可以有多个$(fn)当文档载入时，同时执行所有函数！<br />参数：fn (Function):当文档载入时执行的函数！<br />例子：</span> </span></span><span style="font-size: x-small;"><br /></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">form </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="form1"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input </span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text"</span><span style="color: #ff0000;"> name</span><span style="color: #0000ff;">="textfield"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">input </span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="submit"</span><span style="color: #ff0000;"> name</span><span style="color: #0000ff;">="Submit"</span><span style="color: #ff0000;"> value</span><span style="color: #0000ff;">="提交"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">form</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){ <br />&nbsp;&nbsp;&nbsp; $(form1.elements ).hide(); <br />}</span></div>
<p>&nbsp;</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$( </span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){<br />&nbsp;&nbsp;&nbsp;&nbsp; $(document.body).background(</span><span style="color: #000000;">"</span><span style="color: #000000;">black</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />})</span></div>
<p><span style="font-size: 10pt;">运行：当文档载入时背景变成黑色，相当于onLoad。</span><br /><br /><span style="font-size: 12pt;"><strong style="color: red;"><span style="font-size: 12pt;">$(obj)</span><br /></strong><span style="font-size: small;"><span style="font-size: 10pt;">说明：复制一个jQuery对象，<br />参数：obj (jQuery): 要复制的jQuery对象<br />例子：<br />未执行jQuery前：</span> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">one</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">two</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">three</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> f </span><span style="color: #000000;">=</span><span style="color: #000000;"> $(</span><span style="color: #000000;">"</span><span style="color: #000000;">div</span><span style="color: #000000;">"</span><span style="color: #000000;">); <br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(f).find(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span><span style="color: #000000;">).html()) <br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，弹出对话框文字为two，即div标签下p元素的内容。</span><br /><br /><span style="font-size: 12pt;"><strong style="color: red;"><span style="font-size: 12pt;">each(fn)</span><br /></strong><span style="font-size: small;"><span style="font-size: 10pt;">说明：将函数作用于所有匹配的对象上<br />参数：fn (Function): 需要执行的函数<br />例子：<br />未执行jQuery前：</span> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">img </span><span style="color: #ff0000;">src</span><span style="color: #0000ff;">="1.jpg"</span><span style="color: #0000ff;">/&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">img </span><span style="color: #ff0000;">src</span><span style="color: #0000ff;">="1.jpg"</span><span style="color: #0000ff;">/&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">img</span><span style="color: #000000;">"</span><span style="color: #000000;">).each(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">this</span><span style="color: #000000;">.src </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">2.jpg</span><span style="color: #000000;">"</span><span style="color: #000000;">; });<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，img标签的src都变成了2.jpg。</span><br /><br /><span style="font-size: 12pt;"><strong style="color: red;"><span style="font-size: 12pt;">eq(pos)</span><br /></strong><span style="font-size: small;"><span style="font-size: 10pt;">说明：减少匹配对象到一个单独得dom元素<br />参数：pos (Number): 期望限制的索引，从0 开始<br />例子：<br />未执行jQuery前：</span> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">This is just a test.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">So is this</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span><span style="color: #000000;">).eq(</span><span style="color: #000000;">1</span><span style="color: #000000;">).html())<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，alert对话框显示：So is this，即第二个&lt;p&gt;标签的内容<br /></span><br /><span style="font-size: 12pt;"><span style="font-size: 12pt;"><span style="font-size: small; color: #000000;"><strong style="color: red;">get() get(num)<br /></strong></span></span><span style="font-size: small;"><span style="font-size: 10pt;">说明：获取匹配元素，get(num)返回匹配元素中的某一个元素<br />参数：get (Number): 期望限制的索引，从0 开始<br />例子：<br />未执行jQuery前：</span> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">This is just a test.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">So is this</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span><span style="color: #000000;">).get(</span><span style="color: #000000;">1</span><span style="color: #000000;">).innerHTML);<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，alert对话框显示：So is this，即第二个&lt;p&gt;标签的内容<br /></span><span style="font-size: 10pt; color: #993366;"><strong>注意get和eq的区别，eq返回的是jQuery对象，get返回的是所匹配的dom对象，所有取$("p").eq(1)对象的内容用jQuery方法html()，而取$("p").get(1)的内容用innerHTML<br /></strong></span><br /><span style="font-size: 12pt;"><span style="font-size: 12pt;"><span style="font-size: small; color: #000000;"><strong style="color: red;">index(obj)<br /></strong></span></span><span style="font-size: small;"><span style="font-size: 10pt;">说明：返回对象索引<br />参数：obj (Object): 要查找的对象<br />例子：<br />未执行jQuery前：</span> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test1"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test2"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">div</span><span style="color: #000000;">"</span><span style="color: #000000;">).index(document.getElementById('test1')));<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">div</span><span style="color: #000000;">"</span><span style="color: #000000;">).index(document.getElementById('test2')));<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，两次弹出alert对话框分别显示0，1<br /></span><br /><span style="font-size: 12pt;"><span style="font-size: 12pt;"><span style="font-size: small; color: #000000;"><strong style="color: red;">size()&nbsp;&nbsp; Length<br /></strong></span></span><span style="font-size: small;"><span style="font-size: 10pt;">说明：当前匹配对象的数量，两者等价<br />例子：<br />未执行jQuery前：</span> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">img </span><span style="color: #ff0000;">src</span><span style="color: #0000ff;">="test1.jpg"</span><span style="color: #0000ff;">/&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">img </span><span style="color: #ff0000;">src</span><span style="color: #0000ff;">="test2.jpg"</span><span style="color: #0000ff;">/&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">img</span><span style="color: #000000;">"</span><span style="color: #000000;">).length);<br />}</span></div>
<p><span style="font-size: 10pt;">运行：当点击id为test的元素时，弹出alert对话框显示2，表示找到两个匹配对象</span></p>
<p><span style="font-size: 10pt;"><span style="font-size: 18pt;"><strong><span style="text-decoration: underline;">二：DOM操作</span></strong></span><br /><span style="color: #ff0000;"><strong style="font-size: 12pt;">属性<br /></strong></span><span style="font-size: 10pt;">我们以&lt;img id="a" scr="5.jpg"/&gt;为例，在原始的javascript里面可以用var o=document.getElementById('a')取的id为a的节点对象，在用o.src来取得或修改该节点的scr属性，在jQuery里$("#a")将得到jQuery对象[ &lt;img id="a" scr="5.jpg"/&gt; ]，然后可以用jQuery提供的很多方法来进行操作，如$("#a").scr()将得到5.jpg,$("#a").scr("1.jpg")将该对象src属性改为1,jpg。下面我们来讲jQuery提供的众多jQuery方法，方便大家快速对DOM对象进行操作<br /><strong style="color: #800080;">herf()&nbsp;&nbsp; herf(val)<br /></strong>说明：对jQuery对象属性herf的操作。<br />例子：<br />未执行jQuery前</span><span style="font-size: x-small;"> </span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="1.htm"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">jQuery代码及功能：</span> </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp; alert($(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">).href());<br />&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">).href(</span><span style="color: #000000;">"</span><span style="color: #000000;">2.html</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />}</span></div>
<p><span style="font-size: 10pt;">运行：先弹出对话框显示id为test的连接url，在将其url改为2.html，当弹出对话框后会看到转向到2.html<br />同理，jQuery还提供类似的其他方法，大家可以分别试验一下：<br /><strong style="color: #800080;">herf() herf(val)&nbsp;&nbsp; html() html(val)&nbsp;&nbsp; id() id (val) name() name (val)&nbsp;&nbsp; rel() rel (val)<br />src()&nbsp;&nbsp;&nbsp; src (val)&nbsp;&nbsp; title() title (val)&nbsp;&nbsp; val() val(val)<br /></strong></span><br /><span style="color: #ff0000;"><strong><span style="font-size: x-small;">操作<br /></span></strong></span><span style="font-size: 10pt;"><strong style="color: #800080;">after(html) 在匹配元素后插入一段html</strong> </span><span style="font-size: x-small;">jQuery代码及功能：
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">).after(</span><span style="color: #000000;">"</span><span style="color: #000000;">&lt;b&gt;Hello&lt;/b&gt;</span><span style="color: #000000;">"</span><span style="color: #000000;">);&nbsp;&nbsp;<br />}</span></div>
<p>执行后相当于： </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">b</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Hello</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">b</span><span style="color: #0000ff;">&gt;</span></div>
<p><br /><strong style="color: #800080;">after(elem) after(elems) 将指定对象elem或对象组elems插入到在匹配元素后</strong> </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>jQuery代码及功能 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">a</span><span style="color: #000000;">"</span><span style="color: #000000;">).after($(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">));&nbsp;&nbsp;<br />}</span></div>
<p>执行后相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span></div>
<span style="font-size: x-small;">
<p>&nbsp;</p>
</span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>&nbsp;</p>
<p><br /><span style="font-size: 10pt;"><strong style="color: #800080;">append(html)在匹配元素内部，且末尾插入指定html</strong> </span><span style="font-size: x-small;">jQuery代码及功能： </span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">="test"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>&nbsp;</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="font-size: x-small;"><span style="color: #000000;">function jq(){ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $("#test").append("</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">b</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Hello</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">b</span><span style="color: #0000ff;">&gt;</span></span><span style="color: #000000;"><span style="font-size: x-small;">");&nbsp;&nbsp;<br />}</span></span></div>
<p><span style="font-size: x-small;">执行后相当于 </span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="font-size: x-small;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">b</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Hello</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">b</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></span></div>
<p><span style="font-size: x-small;">同理还有append(elem) append(elems) before(html) before(elem) before(elems)请执行参照append和after的方来测试、理解！<br /><br /><strong><span style="color: #800080;">ap</span><span style="color: #800080;">pendTo(expr) 与append(elem)相反</span></strong>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>jQuery代码及功能 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">a</span><span style="color: #000000;">"</span><span style="color: #000000;">). appendTo ($(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">));&nbsp;&nbsp;<br />}</span></div>
<p>执行后相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"> </span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span></div>
<span style="font-size: x-small;">
<p>&nbsp;</p>
</span></span></p>
<p><br /><span style="font-size: 10pt;"><strong style="font-size: 10pt; color: #800080;">clone() 复制一个jQuery对象</strong> </span><span style="font-size: x-small;"><br /><strong style="color: #800080;">empty() 删除匹配对象的所有子节点</strong>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" />&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">span</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" />&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>jQuery代码及功能： </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">).empty();&nbsp;&nbsp;<br />}</span></div>
<p>执行后相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p><br /><strong><span style="color: #800080;">insertAfter(expr)&nbsp;&nbsp; insertBefore(expr)</span><br /></strong>&nbsp;&nbsp;&nbsp;&nbsp; 按照官方的解释和我的几个简单测试insertAfter(expr)相当于before(elem),insertBefore(expr)相当于after (elem)<br /><br /><strong><span style="color: #800080;">prepend (html) prepend (elem) prepend (elems)&nbsp;&nbsp; 在匹配元素的内部且开始出插入</span><br /></strong>通过下面例子区分append(elem) appendTo(expr) prepend (elem) </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="a"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">p</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">div</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">执行</span>$<strong>("#a").append($("div")) </strong>后相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="a"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp; P<br />&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">div</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">执行</span><strong>$("#a").appendTo($("div")) </strong>后 相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;&nbsp; div<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="a"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">p</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;">执行</span><strong>$("#a").prepend ($("div"))</strong> 后 相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="a"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">div</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br />&nbsp;&nbsp;&nbsp; P<br /></span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span></div>
<p><br /><strong style="color: #800080;">remove() 删除匹配对象</strong><br />注意区分empty()，empty()移出匹配对象的子节点，remove()，移出匹配对象<br /><br />wrap(htm) 将匹配对象包含在给出的html代码内 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"> </span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>jQuery代码及功能： </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span><span style="color: #000000;">).wrap(</span><span style="color: #000000;">"</span><span style="color: #000000;">&lt;div class='wrap'&gt;&lt;/div&gt;</span><span style="color: #000000;">"</span><span style="color: #000000;">); <br />}</span></div>
<p>执行后相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">='wrap'</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span></div>
<span style="font-size: x-small;">
<p>&nbsp;</p>
</span></span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>jQuery代码及功能： </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">#test</span><span style="color: #000000;">"</span><span style="color: #000000;">).clone().appendTo($(</span><span style="color: #000000;">"</span><span style="color: #000000;">a</span><span style="color: #000000;">"</span><span style="color: #000000;">));&nbsp;&nbsp;<br />}</span></div>
<p>复制$("#test")然后插入到&lt;a&gt;后,执行后相当于 </p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="test"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">after</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span></div>
<p>&nbsp;</p>
<p><br /><span style="font-size: 10pt;"><strong style="color: #800080;">wrap(elem) 将匹配对象包含在给出的对象内</strong> </span><span style="font-size: x-small;">jQuery代码及功能： </span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="content"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>&nbsp;</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;"><span style="font-size: x-small;">function</span></span><span style="font-size: x-small;"><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span>span<span style="color:</span></div>
          <br/>
          <span style="color:red;">
            <a href="http://zfms.javaeye.com/blog/190951#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 08 May 2008 10:43:08 +0800</pubDate>
        <link>http://zfms.javaeye.com/blog/190951</link>
        <guid>http://zfms.javaeye.com/blog/190951</guid>
      </item>
      <item>
        <title>推荐--jQuery使用手册 四</title>
        <author>zfms</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://zfms.javaeye.com">zfms</a>&nbsp;
          链接：<a href="http://zfms.javaeye.com/blog/190948" style="color:red;">http://zfms.javaeye.com/blog/190948</a>&nbsp;
          发表时间: 2008年05月08日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="a"</span><span style="color: #ff0000;"> style</span><span style="color: #0000ff;">="background:blue; color:red"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">css</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">P </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="b"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">test</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">P</span><span style="color: #0000ff;">&gt;</span></div>
<p><br /><strong><span style="color: #993366;">css(name)</span> 获取样式名为name的样式</strong> <br />$("#a").css("color") 将得到样式中color值red，("#a").css("background ")将得到blue<br /><br /><strong><span style="color: #993366;">css(prop)</span> prop是一个hash对象，用于设置大量的css样式</strong><br />$("#b").css({ color: "red", background: "blue" });<br />最终效果是&lt;p id="b" style="background:blue; color:red"&gt;test&lt;/p&gt;,{ color: "red", background: "blue" }，hash对象，color为key，"red"为value，<br /><br /><strong><span style="color: #993366;">css(key, value)</span> 用于设置一个单独得css样式<br /></strong>$("#b").css("color","red");最终效果是&lt;p id="b" style="color:red"&gt;test&lt;/p&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="text-decoration: underline;"><strong><span style="font-size: 14pt;">四</span><span style="font-size: 18pt;">：JavaScript处理</span></strong></span><br /><span style="color: red;"><br /></span><span style="font-size: 10pt;"><strong>$.browser() 判断浏览器类型，返回boolen值</strong> </span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">if</span><span style="color: #000000;">($.browser.msie) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(</span><span style="color: #000000;">"</span><span style="color: #000000;">这是一个IE浏览器</span><span style="color: #000000;">"</span><span style="color: #000000;">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">else</span><span style="color: #000000;"> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">($.browser.opera) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(</span><span style="color: #000000;">"</span><span style="color: #000000;">这是一个opera浏览器</span><span style="color: #000000;">"</span><span style="color: #000000;">);}<br />})</span></div>
<p>当页面载入式判断浏览器类型，可判断的类型有msie、mozilla、opera、safari<br /><br /><strong><span style="color: #993366;">$.each(obj, fn)</span> obj为对象或数组，fn为在obj上依次执行的函数，注意区分$().each()</strong></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$.each( [</span><span style="color: #000000;">0</span><span style="color: #000000;">,</span><span style="color: #000000;">1</span><span style="color: #000000;">,</span><span style="color: #000000;">2</span><span style="color: #000000;">], </span><span style="color: #0000ff;">function</span><span style="color: #000000;">(i){ alert( </span><span style="color: #000000;">"</span><span style="color: #000000;">Item #</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> i </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">: </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #0000ff;">this</span><span style="color: #000000;"> ); });</span></div>
<p>&nbsp;&nbsp;&nbsp; 分别将0，1，2为参数，传入到function(i)中</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$.each({ name: </span><span style="color: #000000;">"</span><span style="color: #000000;">John</span><span style="color: #000000;">"</span><span style="color: #000000;">, lang: </span><span style="color: #000000;">"</span><span style="color: #000000;">JS</span><span style="color: #000000;">"</span><span style="color: #000000;"> },&nbsp;&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(i){ alert( </span><span style="color: #000000;">"</span><span style="color: #000000;">Name: </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> i </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, Value: </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #0000ff;">this</span><span style="color: #000000;"> );</span></div>
<p>&nbsp;&nbsp;&nbsp; { name: "John", lang: "JS" }为一个hash对象，依次将hash中每组对象传入到函数中<br /><br /><strong><span style="color: #993366;">$.extend(obj, prop)</span> 用第二个对象扩展第一个对象</strong></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">var</span><span style="color: #000000;"> settings </span><span style="color: #000000;">=</span><span style="color: #000000;"> { validate: </span><span style="color: #0000ff;">false</span><span style="color: #000000;">, limit: </span><span style="color: #000000;">5</span><span style="color: #000000;">, name: </span><span style="color: #000000;">"</span><span style="color: #000000;">foo</span><span style="color: #000000;">"</span><span style="color: #000000;"> };<br /></span><span style="color: #0000ff;">var</span><span style="color: #000000;"> options </span><span style="color: #000000;">=</span><span style="color: #000000;"> { validate: </span><span style="color: #0000ff;">true</span><span style="color: #000000;">, name: </span><span style="color: #000000;">"</span><span style="color: #000000;">bar</span><span style="color: #000000;">"</span><span style="color: #000000;"> };<br />$.extend(settings, options);</span></div>
<p>执行后settings对象为{ validate: true, limit: 5, name: "bar" }<br />可以用下面函数来测试</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> settings </span><span style="color: #000000;">=</span><span style="color: #000000;"> { validate: </span><span style="color: #0000ff;">false</span><span style="color: #000000;">, limit: </span><span style="color: #000000;">5</span><span style="color: #000000;">, name: </span><span style="color: #000000;">"</span><span style="color: #000000;">foo</span><span style="color: #000000;">"</span><span style="color: #000000;"> };<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> options </span><span style="color: #000000;">=</span><span style="color: #000000;"> { validate: </span><span style="color: #0000ff;">true</span><span style="color: #000000;">, name: </span><span style="color: #000000;">"</span><span style="color: #000000;">bar</span><span style="color: #000000;">"</span><span style="color: #000000;"> };<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $.extend(settings, options);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $.each(settings,&nbsp;&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(i){ alert( i </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #0000ff;">this</span><span style="color: #000000;"> ); });<br />})</span></div>
<p><br /><strong><span style="color: #993366;">$.grep(array,fn)</span> 通过函数fn来过滤array，将array中的元素依次传给fn，fn必须返回一个boolen，如fn返回true，将被过滤</strong></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> arr</span><span style="color: #000000;">=</span><span style="color: #000000;"> $.grep( [</span><span style="color: #000000;">0</span><span style="color: #000000;">,</span><span style="color: #000000;">1</span><span style="color: #000000;">,</span><span style="color: #000000;">2</span><span style="color: #000000;">,</span><span style="color: #000000;">3</span><span style="color: #000000;">,</span><span style="color: #000000;">4</span><span style="color: #000000;">], </span><span style="color: #0000ff;">function</span><span style="color: #000000;">(i){ </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> i </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #000000;">2</span><span style="color: #000000;">; });<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $.each(arr, </span><span style="color: #0000ff;">function</span><span style="color: #000000;">(i){ alert(i); });<br />})</span></div>
<p>我们可以看待执行$.grep后数组[0,1,2,3,4]变成[0，1]<br /><br /><strong><span style="color: #993366;">$.merge(first, second)</span> 两个参数都是数组，排出第二个数组中与第一个相同的，再将两个数组合并</strong></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #000000;">$(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> arr </span><span style="color: #000000;">=</span><span style="color: #000000;"> $.merge( [</span><span style="color: #000000;">0</span><span style="color: #000000;">,</span><span style="color: #000000;">1</span><span style="color: #000000;">,</span><span style="color: #000000;">2</span><span style="color: #000000;">], [</span><span style="color: #000000;">2</span><span style="color: #000000;">,</span><span style="color: #000000;">3</span><span style="color: #000000;">,</span><span style="color: #000000;">4</span><span style="color: #000000;">] )<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $.each(arr,&nbsp;&nbsp;</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(i){ alert(i); });<br />})</span></div>
<p>可以看出arr的结果为[0,1,2,3,4]<br /><br /><strong><span style="color: #993366;">$.trim(str)</span> 移出字符串两端的空格</strong><br />&nbsp;&nbsp;&nbsp; $.trim("&nbsp;&nbsp; hello, how are you?&nbsp;&nbsp; ")的结果是"hello, how are you?"</p>
          <br/>
          <span style="color:red;">
            <a href="http://zfms.javaeye.com/blog/190948#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 08 May 2008 10:40:55 +0800</pubDate>
        <link>http://zfms.javaeye.com/blog/190948</link>
        <guid>http://zfms.javaeye.com/blog/190948</guid>
      </item>
      <item>
        <title>推荐--jQuery使用手册 dom 三</title>
        <author>zfms</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://zfms.javaeye.com">zfms</a>&nbsp;
          链接：<a href="http://zfms.javaeye.com/blog/190946" style="color:red;">http://zfms.javaeye.com/blog/190946</a>&nbsp;
          发表时间: 2008年05月08日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><strong style="color: #800080;">remove() 删除匹配对象</strong><br />注意区分empty()，empty()移出匹配对象的子节点，remove()，移出匹配对象<br />wrap(htm) 将匹配对象包含在给出的html代码内</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"> </span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>jQuery代码及功能：</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span><span style="color: #000000;">).wrap(</span><span style="color: #000000;">"</span><span style="color: #000000;">&lt;div class='wrap'&gt;&lt;/div&gt;</span><span style="color: #000000;">"</span><span style="color: #000000;">); <br />}</span></div>
<p>执行后相当于</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">='wrap'</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span></div>
<p><span style="font-size: 10pt;"><strong style="color: #800080;">wrap(elem) 将匹配对象包含在给出的对象内</strong> </span><span style="font-size: x-small;">jQuery代码及功能： </span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="content"</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"><br /></span><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></div>
<p>&nbsp;</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;"><span style="font-size: x-small;">function</span></span><span style="font-size: x-small;"><span style="color: #000000;"> jq(){&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span></span><span style="color: #000000;"><span style="font-size: x-small;">).wrap( document.getElementById('content') );<br />}</span></span></div>
<p>执行后相当于</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="font-size: x-small;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="content"</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Test Paragraph.</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">div</span><span style="color: #0000ff;">&gt;</span></span></div>
<p><br /><span style="color: red;"><strong>遍历、组合<br /></strong></span><span style="font-size: 10pt;"><strong style="color: #800080;">add(expr) 在原对象的基础上在附加符合指定表达式的jquery对象</strong> </span></p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Hello</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;&lt;</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">Hello Again</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">span</span><span style="color: #0000ff;">&gt;&lt;/</span><span style="color: #800000;">p</span><span style="color: #0000ff;">&gt;<br /><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">a </span><span style="color: #ff0000;">href</span><span style="color: #0000ff;">="#"</span><span style="color: #ff0000;"> onClick</span><span style="color: #0000ff;">="jq()"</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;">jQuery</span><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">a</span><span style="color: #0000ff;">&gt;</span></span></div>
<p>jQuery代码及功能：</p>
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; width: 98%; word-break: break-all; padding-top: 4px; background-color: #eeeeee; border: #cccccc 1px solid;"><span style="color: #0000ff;">function</span><span style="color: #000000;"> jq(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> f</span><span style="color: #000000;">=</span><span style="color: #000000;">$(</span><span style="color: #000000;">"</span><span style="color: #000000;">p</span><span style="color: #000000;">"</span><span style="color: #000000;">).add(</span><span style="color: #000000;">"</span><span style="color: #000000;">span</span><span style="color: #000000;">"</span><span style="color: #000000;">);&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">(</span><span style="color: #0000ff;">var</span><span style="color: #000000;"> i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> $(f).size();i</span><span style="color: #000000;">++</span><span style="color: #000000;">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert($(f).eq(i).html());}<br />}</span></div>
<p>执行$("p")得到匹配&lt;p&gt;的对象，有两个，add("spa