??xml version="1.0" encoding="utf-8" standalone="yes"?>成人av观看,久久久亚洲天堂,午夜精品久久久久久久久久久http://www.aygfsteel.com/zh-qi/category/32937.html一切从头开?/description>zh-cnSun, 05 Apr 2009 21:44:23 GMTSun, 05 Apr 2009 21:44:23 GMT60jquery基本教程之简单体?/title><link>http://www.aygfsteel.com/zh-qi/archive/2009/04/03/263747.html</link><dc:creator>W看风云</dc:creator><author>W看风云</author><pubDate>Fri, 03 Apr 2009 06:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/zh-qi/archive/2009/04/03/263747.html</guid><wfw:comment>http://www.aygfsteel.com/zh-qi/comments/263747.html</wfw:comment><comments>http://www.aygfsteel.com/zh-qi/archive/2009/04/03/263747.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/zh-qi/comments/commentRss/263747.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/zh-qi/services/trackbacks/263747.html</trackback:ping><description><![CDATA[<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #000000">Jquery是prototype之后又一个优U的Javascript框架。对prototype我用不多,单了解过。但使用上jquery之后Q马上被她的优雅吸引住了。有Z用这L一比喻来比较prototype和jqueryQprototype像JavaQ而jquery像ruby.实际上我比较喜欢javaQ少接触Ruby|了Q但是jquery的简单的实用的确有相当大的吸引力啊!在项目里我把jquery作ؓ自已唯一的框架类包。用其间也有一点点心得Q其实这些心得,在jquery的文档上面也可能有讲Q不q还是记下来Q以备忘|?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />一Q找C了!<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />q记?()q个东西吧?prototypeq是DWR都用了q个函数代替document.getElementById()。没错,jquery也跟风了。ؓ辑ֈdocument.getElementById()的目的,jquery是这样写的:<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />var someElement </span><span style="color: #000000">=</span><span style="color: #000000"> $(</span><span style="color: #000000">"</span><span style="color: #000000">#myId</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />看v来比其他两个框架的要多了一?Q好Q看看下面的用法Q?br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">div p</span><span style="color: #000000">"</span><span style="color: #000000">);(</span><span style="color: #000000">1</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">div.container</span><span style="color: #000000">"</span><span style="color: #000000">)(</span><span style="color: #000000">2</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">div #msg</span><span style="color: #000000">"</span><span style="color: #000000">);(</span><span style="color: #000000">3</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">table a</span><span style="color: #000000">"</span><span style="color: #000000">,context);(</span><span style="color: #000000">4</span><span style="color: #000000">)  <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />在prototype里看q这L写法吗?W一行代码得到所?/span><span style="color: #000000"><</span><span style="color: #000000">div</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">元素。第二行代码得到class为container?/span><span style="color: #000000"><</span><span style="color: #000000">div</span><span style="color: #000000">></span><span style="color: #000000">元素,W三行代码得?/span><span style="color: #000000"><</span><span style="color: #000000">div</span><span style="color: #000000">></span><span style="color: #000000">标签下面id为msg的元素。第四行代码得到contextZ下文的table里面所有的q接元素?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />如果你熟悉CSSQXpathQ你会觉得这些写法很眼熟Q对了。正是。看出奥妙了吧。jquery是通过q样的方式来扑ֈDom对象里面的元素。跟CSS的选择器相cM?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />二,Jquery对象Q?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />jquery提供了很多便利的函数Q如each(fn)Q但是用这些函数的前提是:你用的对象是Jquer对象。一个Dom对象成ؓ一个Jquery对象很简单,通过下面一些方式(只是一部分Q:<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />var a </span><span style="color: #000000">=</span><span style="color: #000000"> $(</span><span style="color: #000000">"</span><span style="color: #000000">#cid</span><span style="color: #000000">"</span><span style="color: #000000">);(</span><span style="color: #000000">1</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />var b </span><span style="color: #000000">=</span><span style="color: #000000"> $(</span><span style="color: #000000">"</span><span style="color: #000000"><p>hello</p></span><span style="color: #000000">"</span><span style="color: #000000">);(</span><span style="color: #000000">2</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />var c </span><span style="color: #000000">=</span><span style="color: #000000"> document.createElement(</span><span style="color: #000000">"</span><span style="color: #000000">table</span><span style="color: #000000">"</span><span style="color: #000000">); var tb </span><span style="color: #000000">=</span><span style="color: #000000"> $(c);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />三,代替body标签的onload <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />q个惯例Q也许是除了$()之外Q用得最多的地方了。下面一D代码:<br /> <img id="Codehighlighter1_1082_1108_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1082_1108_Open_Text.style.display='none'; Codehighlighter1_1082_1108_Closed_Image.style.display='inline'; Codehighlighter1_1082_1108_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1082_1108_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1082_1108_Closed_Text.style.display='none'; Codehighlighter1_1082_1108_Open_Image.style.display='inline'; Codehighlighter1_1082_1108_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />$(document).ready(function()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1082_1108_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1082_1108_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />  alert(</span><span style="color: #000000">"</span><span style="color: #000000">hello</span><span style="color: #000000">"</span><span style="color: #000000">);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000">);(</span><span style="color: #000000">1</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />  <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">body onload</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">alert('hello');</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000">Q?/span><span style="color: #000000">2</span><span style="color: #000000">Q?nbsp;  <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />上面两段代码是等L。但代码1的好处是做到表现和逻辑分离。ƈ且可以在不同的js文g中做相同的操作,?(document).ready(fn)可以在一个页面中重复出现Q而不会冲H。基本上Jqeury的很多plugin都是利用q个Ҏ,正因个特性,多个plugin共同使用hQ在初始化时不会发生冲突?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />不管怎么_q个惯例可以分离javascript与HTML。推荐用?br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />四,事g机制 <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />我大量用的事g可能是button的onclick了。以前习惯在input 元素上写onclick </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">fn()</span><span style="color: #000000">"</span><span style="color: #000000">,使用jquery可以使javascript代码与html代码分离Q保持HTML的清z,q可以很L地绑定事Ӟ甚至你可以不知道“事g”q个名词?br /> <img id="Codehighlighter1_1520_1656_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1520_1656_Open_Text.style.display='none'; Codehighlighter1_1520_1656_Closed_Image.style.display='inline'; Codehighlighter1_1520_1656_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1520_1656_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1520_1656_Closed_Text.style.display='none'; Codehighlighter1_1520_1656_Open_Image.style.display='inline'; Codehighlighter1_1520_1656_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />$(document).ready(function()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1520_1656_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1520_1656_Open_Text"><span style="color: #000000">{   <br /> <img id="Codehighlighter1_1555_1613_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1555_1613_Open_Text.style.display='none'; Codehighlighter1_1555_1613_Closed_Image.style.display='inline'; Codehighlighter1_1555_1613_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1555_1613_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1555_1613_Closed_Text.style.display='none'; Codehighlighter1_1555_1613_Open_Image.style.display='inline'; Codehighlighter1_1555_1613_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />  $(</span><span style="color: #000000">"</span><span style="color: #000000">#clear</span><span style="color: #000000">"</span><span style="color: #000000">).click(function()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1555_1613_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1555_1613_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />     alert(</span><span style="color: #000000">"</span><span style="color: #000000">i am about to clear the table</span><span style="color: #000000">"</span><span style="color: #000000">);     <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />   }</span></span><span style="color: #000000">);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />  $(</span><span style="color: #000000">"</span><span style="color: #000000">form[0]</span><span style="color: #000000">"</span><span style="color: #000000">).submit(validate);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000">);   <br /> <img id="Codehighlighter1_1682_1718_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1682_1718_Open_Text.style.display='none'; Codehighlighter1_1682_1718_Closed_Image.style.display='inline'; Codehighlighter1_1682_1718_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1682_1718_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1682_1718_Closed_Text.style.display='none'; Codehighlighter1_1682_1718_Open_Image.style.display='inline'; Codehighlighter1_1682_1718_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />function validate()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1682_1718_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1682_1718_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />  </span><span style="color: #008000">//</span><span style="color: #008000">do some form validation   </span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" /></span><span style="color: #000000">}</span></span><span style="color: #000000">   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />五,同一函数实现set</span><span style="color: #000000">&</span><span style="color: #000000">get<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">#msg</span><span style="color: #000000">"</span><span style="color: #000000">).html();<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">#msg</span><span style="color: #000000">"</span><span style="color: #000000">).html(</span><span style="color: #000000">"</span><span style="color: #000000">hello</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />上面两行代码Q调用了同样的函数。但l果却差别很大?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />W一行是q回指定元素的HTML|W二行则是将helloq串字符讄到指定元素中。jquery的函数大部分有这LҎ?br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />六,ajax <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />q是一个ajax横行的时代。多hQ了不了解ajax的都跟着用上一把。呵。用jquery实现ajax同样单异?br /> <img id="Codehighlighter1_1956_1961_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1956_1961_Open_Text.style.display='none'; Codehighlighter1_1956_1961_Closed_Image.style.display='inline'; Codehighlighter1_1956_1961_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1956_1961_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1956_1961_Closed_Text.style.display='none'; Codehighlighter1_1956_1961_Open_Image.style.display='inline'; Codehighlighter1_1956_1961_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />$.get(</span><span style="color: #000000">"</span><span style="color: #000000">search.do</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1956_1961_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1956_1961_Open_Text"><span style="color: #000000">{id:</span><span style="color: #000000">1</span><span style="color: #000000">}</span></span><span style="color: #000000">,rend);   <br /> <img id="Codehighlighter1_1991_2015_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1991_2015_Open_Text.style.display='none'; Codehighlighter1_1991_2015_Closed_Image.style.display='inline'; Codehighlighter1_1991_2015_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1991_2015_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1991_2015_Closed_Text.style.display='none'; Codehighlighter1_1991_2015_Open_Image.style.display='inline'; Codehighlighter1_1991_2015_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />function rend(xml)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1991_2015_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1991_2015_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    alert(xml);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"> (</span><span style="color: #000000">1</span><span style="color: #000000">)   <br /> <img id="Codehighlighter1_2043_2048_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2043_2048_Open_Text.style.display='none'; Codehighlighter1_2043_2048_Closed_Image.style.display='inline'; Codehighlighter1_2043_2048_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_2043_2048_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2043_2048_Closed_Text.style.display='none'; Codehighlighter1_2043_2048_Open_Image.style.display='inline'; Codehighlighter1_2043_2048_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />$.post(</span><span style="color: #000000">"</span><span style="color: #000000">search.do</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_2043_2048_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2043_2048_Open_Text"><span style="color: #000000">{id:</span><span style="color: #000000">1</span><span style="color: #000000">}</span></span><span style="color: #000000">,rend);   <br /> <img id="Codehighlighter1_2078_2102_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2078_2102_Open_Text.style.display='none'; Codehighlighter1_2078_2102_Closed_Image.style.display='inline'; Codehighlighter1_2078_2102_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_2078_2102_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2078_2102_Closed_Text.style.display='none'; Codehighlighter1_2078_2102_Open_Image.style.display='inline'; Codehighlighter1_2078_2102_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />function rend(xml)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_2078_2102_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2078_2102_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    alert(xml);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"> (</span><span style="color: #000000">2</span><span style="color: #000000">)   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />  <br /> <img id="Codehighlighter1_2144_2178_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2144_2178_Open_Text.style.display='none'; Codehighlighter1_2144_2178_Closed_Image.style.display='inline'; Codehighlighter1_2144_2178_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_2144_2178_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2144_2178_Closed_Text.style.display='none'; Codehighlighter1_2144_2178_Open_Image.style.display='inline'; Codehighlighter1_2144_2178_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">#msg</span><span style="color: #000000">"</span><span style="color: #000000">).ajaxStart(function()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_2144_2178_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2144_2178_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />   </span><span style="color: #0000ff">this</span><span style="color: #000000">.html(</span><span style="color: #000000">"</span><span style="color: #000000">正在加蝲。。。?/span><span style="color: #000000">"</span><span style="color: #000000">);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000">);(</span><span style="color: #000000">3</span><span style="color: #000000">)   <br /> <img id="Codehighlighter1_2220_2251_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2220_2251_Open_Text.style.display='none'; Codehighlighter1_2220_2251_Closed_Image.style.display='inline'; Codehighlighter1_2220_2251_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_2220_2251_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2220_2251_Closed_Text.style.display='none'; Codehighlighter1_2220_2251_Open_Image.style.display='inline'; Codehighlighter1_2220_2251_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">#msg</span><span style="color: #000000">"</span><span style="color: #000000">).ajaxSuccess(function()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_2220_2251_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2220_2251_Open_Text"><span style="color: #000000">{   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />   </span><span style="color: #0000ff">this</span><span style="color: #000000">.html(</span><span style="color: #000000">"</span><span style="color: #000000">加蝲完成Q?/span><span style="color: #000000">"</span><span style="color: #000000">);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000">);(</span><span style="color: #000000">4</span><span style="color: #000000">)  <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />q些都是较常用的ҎQget和post用法一栗第一个参数是异步h的urlQ第二个为参敎ͼW三个回调方法?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">3</span><span style="color: #000000">Q?的方法会在指定的Dom对象上绑定响应ajax执行的事件。当Ӟjquery的AJAX相关的函C仅是q些Q有兴趣可以ȝI再多?br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />七,渐入淡出 <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">#msg</span><span style="color: #000000">"</span><span style="color: #000000">).fadeIn(</span><span style="color: #000000">"</span><span style="color: #000000">fast</span><span style="color: #000000">"</span><span style="color: #000000">);   <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />$(</span><span style="color: #000000">"</span><span style="color: #000000">#msg</span><span style="color: #000000">"</span><span style="color: #000000">).fadeOut(</span><span style="color: #000000">"</span><span style="color: #000000">slow</span><span style="color: #000000">"</span><span style="color: #000000">);  <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />没错Q上面两行代码已l分别实C一个id为Msg的jquery对象的渐入和淡出。做一个像Gmail一L动态加载通知条,用jquery那么简单。两个函数接受的参数除了快慢{,q可以接收整型,作ؓ渐入或E出的完成旉Q单位ؓMS?br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />八,plugin<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />q也是一个插件的时代?nbsp;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />jquery插gl我的感觉清一色的清洁Q简单。如JtipQ要使用它的功能Q只需要在你的元素的class上加上Jtip,q引入jtip.js及其样式卛_以了。其他事情插件全包。我喜欢jquery的一个重要原因是发现她已l有了很多很好,很精彩的插g?br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span></div> <img src ="http://www.aygfsteel.com/zh-qi/aggbug/263747.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/zh-qi/" target="_blank">W看风云</a> 2009-04-03 14:54 <a href="http://www.aygfsteel.com/zh-qi/archive/2009/04/03/263747.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>列表框的左右上下Udhttp://www.aygfsteel.com/zh-qi/archive/2009/01/09/250712.htmlW看风云W看风云Fri, 09 Jan 2009 08:41:00 GMThttp://www.aygfsteel.com/zh-qi/archive/2009/01/09/250712.htmlhttp://www.aygfsteel.com/zh-qi/comments/250712.htmlhttp://www.aygfsteel.com/zh-qi/archive/2009/01/09/250712.html#Feedback0http://www.aygfsteel.com/zh-qi/comments/commentRss/250712.htmlhttp://www.aygfsteel.com/zh-qi/services/trackbacks/250712.html效果囑֦下:

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    
<head>
        
<title>列表框上下左x?/span></title>
    
</head>
    
<script language="javascript">  
    
<!--   
    var ListUtil 
= new Object();   
    
//全部Ud   
    ListUtil.moveAll = function moveAll(oListboxFrom,oListboxTo){   
        var options 
= oListboxFrom.options;   
        
for(var i = 0; i < options.length; i++){   
            oListboxTo.appendChild(options[i]); 
//???   
            i -= 1;  //???每删除一个选项后,每个选项的index会被重置   
        }
   
    }
   
    
//单个或多个移?nbsp;  
    ListUtil.moveMuti = function moveMuti(oListboxFrom,oListboxTo){   
        var options 
= oListboxFrom.options;   
        
for(var i = 0; i < options.length; i++){   
            
if(options[i].selected){   
                oListboxTo.appendChild(options[i]);   
                i 
-= 1;   
            }
   
        }
   
    }
   
    
//上移   
    ListUtil.shiftUp = function(oListbox) {   
        
if(oListbox.selectedIndex > 0){   
            var oOption 
= oListbox.options[oListbox.selectedIndex];   
            var oPrevOption 
= oListbox.options[oListbox.selectedIndex-1];   
            oListbox.insertBefore(oOption,oPrevOption);   
        }
   
    }
   
    
//下移   
    ListUtil.shiftDown = function(oListbox){   
        
if(oListbox.selectedIndex < oListbox.options.length-1){   
            var oOption 
= oListbox.options[oListbox.selectedIndex];   
            var oNextOption 
= oListbox.options[oListbox.selectedIndex+1];   
            oListbox.insertBefore(oNextOption,oOption);   
        }
   
    }
   
    
//-->  
    </script>
    
<body text="#000000" bgcolor="#ffffff" link="#0033cc">
        
<form method=post action="#">
            
<table>
                
<tr><td>
                        未选员?br />                         
<select name="oListboxFrom" id="oListboxFrom" size="10"
                            multiple
="true"
                            style
="width: 100px; height: 250px; margin-left: 20px; float: left">
                            
<option value="1" selected>员工1</option>
                            
<option value="2">员工2</option>
                            
<option value="3">员工3</option>
                            
<option value="4">员工4</option>
                            
<option value="5">员工5</option>
                        
</select>
                    
</td>
                    
<td align="center">
                        
<input type="button" value=" >>> "
                            onclick
="ListUtil.moveAll(oListboxFrom, oListboxTo);" />
                        
<br />
                        
<input type="button" value=" >> "
                            onclick
="ListUtil.moveMuti(oListboxFrom, oListboxTo);" />
                        
<br />
                        
<input type="button" value=" << "
                            onclick
="ListUtil.moveMuti(oListboxTo, oListboxFrom);" />
                        
<br />
                        
<input type="button" value=" <<< "
                            onclick
="ListUtil.moveAll(oListboxTo, oListboxFrom);" />
                        
<br />
                        
<input type="button" value=" ↑ "
                            onclick
="ListUtil.shiftUp(oListboxFrom);" />
                        
<br />
                        
<input type="button" value=" ↓ "
                            onclick
="ListUtil.shiftDown(oListboxFrom);" />
                    
</td>
                    
<td>
                        已选员?br />                         
<select name="oListboxTo" id="oListboxTo" multiple="true"
                            size
="10"
                            style
="width: 100px; height: 250px; margin-left: 20px; float: left">
                            
<option value="319094784">员工6</option>
                            
<option value="320274432">员工8</option>
                            
<option value="322109440">员工7</option>
                        
</select>
                    
</td>
                
</tr>
            
</table>
        
</form>
    
</body>
</html>



W看风云 2009-01-09 16:41 发表评论
]]>
控制Checkbox全选的JShttp://www.aygfsteel.com/zh-qi/archive/2008/07/10/214098.htmlW看风云W看风云Thu, 10 Jul 2008 11:49:00 GMThttp://www.aygfsteel.com/zh-qi/archive/2008/07/10/214098.htmlhttp://www.aygfsteel.com/zh-qi/comments/214098.htmlhttp://www.aygfsteel.com/zh-qi/archive/2008/07/10/214098.html#Feedback0http://www.aygfsteel.com/zh-qi/comments/commentRss/214098.htmlhttp://www.aygfsteel.com/zh-qi/services/trackbacks/214098.html <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<script language=
"javascript">
function selcheck() {
  var objs = document.getElementsByTagName(
"input");
  for(var i=0; i<objs.length; i++) {
    if(objs<i>.type.toLowerCase() ==
"checkbox" )
       objs<i>.checked = true;
   }
}
function clearcheck() {
  var objs = document.getElementsByTagName(
"input");
  for(var i=0; i<objs.length; i++) {
    if(objs<i>.type.toLowerCase() ==
"checkbox" )
       objs<i>.checked = false;
   }
}
</script>
使用Ҏ:

1. ?lt;head></head>内插入如上JS代码

2. 讄checkbox,例如
<table>
<TR>
<td>
<INPUT type="checkbox" name="1" value="a">
</td>
<td>
<INPUT type=
"checkbox" name="2" value="b">
</td>
<td>
<INPUT type=
"checkbox" name="3" value="c">
</td>
</TR>
</table>

3. 加入一个控制按??
<INPUT type=
"button" name="select" value="?? onclick="selcheck()">
<INPUT type=
"button" name="select" value="?? onclick="clearcheck()">
当然,也可以用idq行控制


W看风云 2008-07-10 19:49 发表评论
]]>
jsq行有效性验?/title><link>http://www.aygfsteel.com/zh-qi/archive/2008/07/10/214095.html</link><dc:creator>W看风云</dc:creator><author>W看风云</author><pubDate>Thu, 10 Jul 2008 11:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/zh-qi/archive/2008/07/10/214095.html</guid><wfw:comment>http://www.aygfsteel.com/zh-qi/comments/214095.html</wfw:comment><comments>http://www.aygfsteel.com/zh-qi/archive/2008/07/10/214095.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/zh-qi/comments/commentRss/214095.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/zh-qi/services/trackbacks/214095.html</trackback:ping><description><![CDATA[<font size="2">1.reg.jsp</font><br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000"><%</span><span style="color: #000000">@ page language</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">java</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #0000ff">import</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">java.util.*</span><span style="color: #000000">"</span><span style="color: #000000"> pageEncoding</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">UTF-8</span><span style="color: #000000">"</span><span style="color: #000000">%></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">html</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">head</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />    </span><span style="color: #000000"><</span><span style="color: #000000">title</span><span style="color: #000000">></span><span style="color: #000000">reg</span><span style="color: #000000"></</span><span style="color: #000000">title</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />    </span><span style="color: #000000"><</span><span style="color: #000000">script language</span><span style="color: #000000">=</span><span style="color: #000000">javascript</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />function check_admin()<br /> <img id="Codehighlighter1_162_246_Open_Image" onclick="this.style.display='none'; Codehighlighter1_162_246_Open_Text.style.display='none'; Codehighlighter1_162_246_Closed_Image.style.display='inline'; Codehighlighter1_162_246_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_162_246_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_162_246_Closed_Text.style.display='none'; Codehighlighter1_162_246_Open_Image.style.display='inline'; Codehighlighter1_162_246_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_162_246_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_162_246_Open_Text"><span style="color: #000000">{ <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />   window.demo.location.href</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">checkadmin.jsp?admin=</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">document.all.admin.value;  <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />function show_rpt(tag)<br /> <img id="Codehighlighter1_271_424_Open_Image" onclick="this.style.display='none'; Codehighlighter1_271_424_Open_Text.style.display='none'; Codehighlighter1_271_424_Closed_Image.style.display='inline'; Codehighlighter1_271_424_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_271_424_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_271_424_Closed_Text.style.display='none'; Codehighlighter1_271_424_Open_Image.style.display='inline'; Codehighlighter1_271_424_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_271_424_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_271_424_Open_Text"><span style="color: #000000">{ </span><span style="color: #0000ff">if</span><span style="color: #000000">(tag</span><span style="color: #000000">==</span><span style="color: #000000">0</span><span style="color: #000000">)<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />   document.all.rpt.innerHTML</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000"><font color=#00AA00>可用</font></span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />   </span><span style="color: #0000ff">else</span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />   document.all.rpt.innerHTML</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000"><font color=#FF0000>已经存在Q不可用</font></span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"></</span><span style="color: #000000">script</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"></</span><span style="color: #000000">head</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">body</span><span style="color: #000000">></span><span style="color: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">table</span><span style="color: #000000">><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />   </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> 登陆?</span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">><</span><span style="color: #000000">td</span><span style="color: #000000">><</span><span style="color: #000000">input type</span><span style="color: #000000">=</span><span style="color: #000000">text name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">admin</span><span style="color: #000000">"</span><span style="color: #000000"> onBlur</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">check_admin();</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">html:errors property</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">admin</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />    </span><span style="color: #000000"><</span><span style="color: #000000">span ID</span><span style="color: #000000">=</span><span style="color: #000000">rpt</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">span</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />   </span><span style="color: #000000"><</span><span style="color: #000000">input type</span><span style="color: #000000">=</span><span style="color: #000000">button 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: #000000"> onclick</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">check_admin();</span><span style="color: #000000">"</span><span style="color: #000000">/></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />   </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />   </span><span style="color: #000000"></</span><span style="color: #000000">table</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />   </span><span style="color: #000000"><</span><span style="color: #000000">iframe name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">demo</span><span style="color: #000000">"</span><span style="color: #000000"> ID</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">demo</span><span style="color: #000000">"</span><span style="color: #000000"> width</span><span style="color: #000000">=</span><span style="color: #000000">95</span><span style="color: #000000">%</span><span style="color: #000000"> height</span><span style="color: #000000">=</span><span style="color: #000000">0</span><span style="color: #000000"> frameborder</span><span style="color: #000000">=</span><span style="color: #000000">0</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">iframe</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"></</span><span style="color: #000000">body</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"></</span><span style="color: #000000">html</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <br /> <font size="2">2.checkadmin.jsp</font><br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000"><%</span><span style="color: #000000">@ page language</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">java</span><span style="color: #000000">"</span><span style="color: #000000"> pageEncoding</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">UTF-8</span><span style="color: #000000">"</span><span style="color: #000000">%></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><%</span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />String admin</span><span style="color: #000000">=</span><span style="color: #000000">request.getParameter(</span><span style="color: #000000">"</span><span style="color: #000000">admin</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />System.out.println(admin);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">if</span><span style="color: #000000">(admin</span><span style="color: #000000">==</span><span style="color: #0000ff">null</span><span style="color: #000000">||</span><span style="color: #000000">admin.length()</span><span style="color: #000000"><</span><span style="color: #000000">1</span><span style="color: #000000">)</span><span style="color: #0000ff">return</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">if</span><span style="color: #000000">(admin.equals(</span><span style="color: #000000">"</span><span style="color: #000000">admin</span><span style="color: #000000">"</span><span style="color: #000000">))<br /> <img id="Codehighlighter1_189_269_Open_Image" onclick="this.style.display='none'; Codehighlighter1_189_269_Open_Text.style.display='none'; Codehighlighter1_189_269_Closed_Image.style.display='inline'; Codehighlighter1_189_269_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_189_269_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_189_269_Closed_Text.style.display='none'; Codehighlighter1_189_269_Open_Image.style.display='inline'; Codehighlighter1_189_269_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_189_269_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_189_269_Open_Text"><span style="color: #000000">{ out.print(</span><span style="color: #000000">"</span><span style="color: #000000"><script language=javascript>window.parent.show_rpt(1);</script></span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">else</span><span style="color: #000000"><br /> <img id="Codehighlighter1_276_356_Open_Image" onclick="this.style.display='none'; Codehighlighter1_276_356_Open_Text.style.display='none'; Codehighlighter1_276_356_Closed_Image.style.display='inline'; Codehighlighter1_276_356_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_276_356_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_276_356_Closed_Text.style.display='none'; Codehighlighter1_276_356_Open_Image.style.display='inline'; Codehighlighter1_276_356_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_276_356_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_276_356_Open_Text"><span style="color: #000000">{ out.print(</span><span style="color: #000000">"</span><span style="color: #000000"><script language=javascript>window.parent.show_rpt(0);</script></span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000">%></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <img src ="http://www.aygfsteel.com/zh-qi/aggbug/214095.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/zh-qi/" target="_blank">W看风云</a> 2008-07-10 19:40 <a href="http://www.aygfsteel.com/zh-qi/archive/2008/07/10/214095.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>10U后实现面自动跌{http://www.aygfsteel.com/zh-qi/archive/2008/07/10/213945.htmlW看风云W看风云Thu, 10 Jul 2008 05:43:00 GMThttp://www.aygfsteel.com/zh-qi/archive/2008/07/10/213945.htmlhttp://www.aygfsteel.com/zh-qi/comments/213945.htmlhttp://www.aygfsteel.com/zh-qi/archive/2008/07/10/213945.html#Feedback0http://www.aygfsteel.com/zh-qi/comments/commentRss/213945.htmlhttp://www.aygfsteel.com/zh-qi/services/trackbacks/213945.html<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  
<head>
    
<title>pȝ出错</title>
    
    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    
<meta http-equiv="description" content="this is my page">
    
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<!--脚本开?/span>-->
<script language=javascript>
function countDown(secs,surl){
 tiao.innerText
=secs;
 
if(--secs>0){
     setTimeout(
"countDown("+secs+",'"+surl+"')",1000);
 }
else{   window.open(surl,'_parent'); } 
}
</script>
<!--脚本l束--> 
  
</head>
  
  
<body>
   
<h3> pȝ已拦截了您的非法操作Q请q回首页Q如果该问题重复出现Q请联系pȝ理员?/span></h3><br>
<br><span id="tiao"><b>10</b></span>U后自动跌{到首c?/span><script language=javascript>countDown(10,'http://www.sina.com');</script>
<a href="http://www.baidu.com" target="_parent">如果您的览器没有自动蟩转,L击这?/span></a>
  
</body>
</html> 使用target主要是防止页面内嵌以?仍然能够跛_?不要内嵌到当前页?

W看风云 2008-07-10 13:43 发表评论
]]>
վ֩ģ壺 ũ| ɽ| ͼʲ| ʼ| ɳ| | ڽ| ̳| Ϫ| | ǿ| | ˮ| | | | | ɽ| | ²| | Ĭ| | ҳ| | | | | | | Ԫ| Ѯ| | ʯ| | | ٹ| | ƽɽ| | |