forever_yl 发表于 2011-12-22 08:54

js code snippet

<P>jquery checkbox</P>
<DIV id=codeText class=codeText>
<OL style="PADDING-BOTTOM: 5px; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 5px" class=dp-css>
<LI><SPAN style="COLOR: #000000"><SPAN style="COLOR: #0000ff">var</SPAN> query <SPAN style="COLOR: #0000cc">=</SPAN> $<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"#q"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>val<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">toString</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #0000ff">var</SPAN> qstr <SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #ff00ff">"?q="</SPAN><SPAN style="COLOR: #0000cc">+</SPAN>query<SPAN style="COLOR: #0000cc">;</SPAN><BR></LI>
<LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #0000ff">var</SPAN> cn<SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">$</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"#city"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">find</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"option:selected"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">text</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">toString</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN></SPAN></LI></OL></DIV>
页: [1]
查看完整版本: js code snippet