1>.jqueryеeq()get()
eq()صһjquery,
get()صһdom

ٸ:
<p style="color:yellow"></p>
ʹeq()õһpǩcolorֵ
$("p").eq(0).css("color"); //Ϊeq(num)صǸjq,Կjqķcss

ʹgetõһpǩcolorֵ
$("p").get(0).style.color; //Ϊget(num)صǸhtml,ҪʹôͳHTML󷽷,jqʱû

ȻҲget(num)ѶתΪjqueryٽв
$($("p").get(0)).css("color");
2>.ȡıֵ
$("#txtuname").val();
or $("input[@name='txtuname']").val(); 
<input type="text" nam="txtuname" id="txtuname" />

=======================================================================
$.map(array, fn):ӳ.һеĿ(ת)浽һ,ɵ.
eg: var tempArr1=$.map([0,1,2],function(i){ return i + 4; });
    tempArr1Ϊ[4,5,6]

========================================================================
jqueryһjqueryҪתΪdomȡеĳһһͨȡ
磺$("#msg")[0]$("div").eq(1)[0]$("td")[5]Щdom

toggle(); 
1.лԪصĿɼ״̬ʾʾ
2.ÿεʱлҪõĺ
eg:
$("p:eq(0)").toggle(function()
            {
                $(this).css("color","red");
            },
            function()
            {
                $(this).css("color","yellow");
            });
========================================================================
$(document).ready()DOMṹִеģ
window.onloadǵļִеģ
ע,һDOM,һļ
========================================================================
 function test()
    {
        $("#zc li:eq(0)").fadeOut("slow",function()
        {
            $(this).clone().appendTo($(this).parent()).fadeIn("slow");
            $(this).remove();
        });
    }
    setInterval("test()",1000);


<div id="zc">
     <ul>
         <li>1111</li>
         <li>2222</li>
         <li>3333</li>
         <li>4444</li>
     </ul>
</div>
=======================================================================
jqueryж
$.browser.msie
$.browser.mozilla
$.browser.safari
$.browser.opera
=======================================================================
$('#faq').find('dd').hide().end().find('dt').click(function() {
         1> var answer = $(this).next();
         2> if (answer.is(':visible'))
         3> {
         4>    answer.slideUp();
         5> } 
         6> else 
         7> {
         8>    answer.slideDown();
         9> }

});
<dl id="faq">
    <dt>Ա</dt>
    <dd></dd>
    <dt></dt>
    <dd>23</dd>
</dl>

:1>-9> дΪ $(this).next().slideToggle();
===========================================================================
empty() ɾƥӽڵ

<div id="test">
   <span>span</span>
   <p>after</p>
</div>
<a href="#" onClick="jq()">jQuery</a>
 
function jq(){  
     $("#test").empty();  
}
ִк൱
<div id="test"></div><a href="#" onClick="jq()">jQuery</a>
=========================================================================
:first ֻƥһԪ
:first-child ΪÿԪƥһԪ

:last
:last-child ͬ
eg:
<ul>
  <li>John</li>
  <li>Karl</li>
  <li>Brandon</li>
</ul>
<ul>
  <li>Glen</li>
  <li>Tane</li>
  <li>Ralph</li>
</ul> 
$("ul li:first")        //[<li>John</li>]
$("ul li:first-child")  //[<li>John</li>,<li>Glen</li>]
========================================================================
<table width="50%">
  <tr>
     <td>ѡԴ</td>
     <td id="changeContent">HTMLҳ</td>
      <td>
          <select id="s1">
             <option value="1">HTMLҳ</option>
             <option value="2">Դ</option>
             <option value="3">Դ</option>
             <option value="4">Բ</option>
             <option value="5">μԴ</option>
             <option value="6">ʾ</option>
             <option value="7">FAQ</option>
             <option value="8">ı</option>
           </select>
      </td>
  </tr>
</table>

ȡѡеֵ
$(function()
{
	$("#s1").change(function()
	{
		    $("#changeContent").html($("option[value="+$(this).val()+"]").html());
	});
});
================================================================================
ųһ
$("tr:not(:first)").css("color","red");
================================================================================
ʣ
<input id="remember" name="remember"  type="checkbox">Test 
JS
var remember = $("#remember").val();
ΪʲôǷѡиøѡ rememberֵon
answer:
ΪcheckboxĬvalueֵon,checked or uncheckedֻǸıcheckedԶ
================================================================================
˵$("div [a]")$("div a")
$("div[a]") ʾaǩdiv,صdivǩ
$("div a")  ʾdivеaǩ,صaǩ 
================================================================================
еÿһжһ ʹ:emptyαѡ
$('td:empty').html('-');
================================================================================
ĸлɫ
$("tr").each(function(i)
{
	this.style.backgroundColor=['red'][i%2]  //ʾżΪɫ ɫ
});
==>
$("tr:even").each(function()
{
	this.style.backgroundColor='red'		
});
ע:
this.style.backgroundColor=['#ccc','#fff'][i%2]
i%2ȡҪôΪ0ҪôΪ1
Ҫô['#ccc','#fff'][0]  Ҫô['#ccc','#fff'][1]
Ҫô#ccc,Ҫô#fff -->Ϊ#ccc,żΪ#fff
===============================================================================
next()  next(expr)  ƥʣֵܽڵ 
<p>Hello</p><p id="a">Hello Again</p><p class="selected">And Again</p>
jQuery뼰 
function jq(){
        alert($("p").next().html());
        alert($("p").next(".selected").html());
}
$("p").next() [ <p id="a">Hello Again</p> , <p class="selected">And Again</p> ]
$("p").next(".selected)ֻ [<p class="selected">And Again</p> ]һ
================================================================================
1. :nth-child(index/even/odd/equation)÷
壺ƥ丸ԪµĵNӻżԪ ':eq(index)' ֻƥһԪأΪÿһԪƥԪء:nth-child1ʼģ:eq()Ǵ0ģ 
ʹ﷨
:nth-child(2) //Ϊ2Ԫ
:nth-child(even) //ΪżԪ
:nth-child(odd)  //ΪԪ
:nth-child(3n)   //Ϊ3 * nԪأn=0,1,2,3,4......3ģԻ1,2,4,5,6...֮ģͬ
:nth-child(3n+1) //Ϊ3 * n + 1Ԫأn=0,1,2,3,4...
:nth-child(3n+2) //Ϊ3 * n + 2Ԫأn=0,1,2,3,4...
ֵArray<Element>
index (Number) : ҪƥԪصţ1ʼ


2.  :first-child÷
:ƥһԪ ':first' ֻƥһԪ,ѡΪÿԪƥһԪ


3.  :last-child÷
:ƥһԪ ':last'ֻƥһԪ,ѡΪÿԪƥһԪ 


4.  :only-child÷
:ĳԪǸԪΨһԪ,ǽᱻƥ ԪкԪ,ǽ
ᱻƥ
=====================================================================================
ߺָjQuery("$")϶ĺЩǹຯC#õtrim()


JSON 
򵥵˵JSON Խ JavaScript бʾһתΪַȻͿں֮ɵشַ
첽Ӧóнַ Web ͻݸ˳
