锘??xml version="1.0" encoding="utf-8" standalone="yes"?>www亚洲精品久久久乳,亚洲视频在线观看免费,春暖花开亚洲性无区一区二区http://m.tkk7.com/juhongtao/category/16856.htmlzh-cnMon, 23 Jul 2007 12:59:08 GMTMon, 23 Jul 2007 12:59:08 GMT60javascript 鐨勫嚑縐嶆帓搴忔柟娉?/title><link>http://m.tkk7.com/juhongtao/archive/2007/07/23/131899.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Mon, 23 Jul 2007 08:23:00 GMT</pubDate><guid>http://m.tkk7.com/juhongtao/archive/2007/07/23/131899.html</guid><wfw:comment>http://m.tkk7.com/juhongtao/comments/131899.html</wfw:comment><comments>http://m.tkk7.com/juhongtao/archive/2007/07/23/131899.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/juhongtao/comments/commentRss/131899.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/juhongtao/services/trackbacks/131899.html</trackback:ping><description><![CDATA[ <p>鎵璋撴帓搴忥紝灝辨槸瑕佹暣鐞嗘枃浠朵腑鐨勮褰曪紝浣夸箣鎸夊叧閿瓧閫掑(鎴栭掑噺)嬈″簭鎺掑垪璧鋒潵銆傚叾紜垏瀹氫箟濡備笅錛?br />銆銆杈撳叆錛歯涓褰昍<sub>1</sub>錛孯<sub>2</sub>錛屸︼紝R<sub>n</sub>錛屽叾鐩稿簲鐨勫叧閿瓧鍒嗗埆涓篕<sub>1</sub>錛孠<sub>2</sub>錛屸︼紝K<sub>n</sub>銆?br />銆銆杈撳嚭錛歊<sub>il</sub>錛孯<sub>i2</sub>錛屸︼紝R<sub>in</sub>錛屼嬌寰桲<sub>i1</sub>鈮<sub>i2</sub>鈮も︹墹K<sub>in</sub>銆?鎴朘<sub>i1</sub>鈮<sub>i2</sub>鈮モ︹墺K<sub>in</sub>)銆?/p> <p>聽(tīng)聽(tīng)聽(tīng) 榪欓噷錛屾垜浠畝鍗曚粙緇嶅嚑縐嶆帓搴忔柟娉曪紝鐩存帴鎻掑叆鎺掑簭銆佸笇鍎挎帓搴忋佸啋娉℃帓搴忋佸揩閫熸帓搴忋佺洿鎺ラ夋嫨鎺掑簭錛屾枃涓墍鎻愬強(qiáng)鐨勪唬鐮佸湪IE6涓嬫祴璇曢氳繃銆?/p> <p> <strong>鐩存帴鎻掑叆鎺掑簭鍩烘湰鎬濇兂</strong> <br />聽(tīng)聽(tīng)聽(tīng) 鍋囪寰呮帓搴忕殑璁板綍瀛樻斁鍦ㄦ暟緇凴[1..n]涓傚垵濮嬫椂錛孯[1]鑷垚1涓湁搴忓尯錛屾棤搴忓尯涓篟[2..n]銆備粠i=2璧風(fēng)洿鑷砳=n涓烘錛屼緷嬈″皢R[i]鎻掑叆褰撳墠鐨勬湁搴忓尯R[1..i-1]涓紝鐢熸垚鍚玭涓褰曠殑鏈夊簭鍖恒?/p> <p>聽(tīng)聽(tīng)聽(tīng) 綆楁硶鎻忚堪<br /><span id="6661116" class="code"><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)I(yíng)nsertSort(arr)聽(tīng){聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鎻掑叆鎺掑簭->鐩存帴鎻掑叆娉曟帓搴?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)st聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date();<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp,聽(tīng)j;<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;聽(tīng)i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">arr.length;聽(tīng)i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">((arr[i])聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arr[i</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]))聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)temp聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[i];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)j聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)i</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">do</span><span style="color: rgb(0, 0, 0);">聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[j];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)j</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">聽(tīng)(j</span><span style="color: rgb(0, 0, 0);">>-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽(tīng)(temp)聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arr[j]));<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp;<br />聽(tīng)聽(tīng)聽(tīng)}</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">endif</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)status聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date()聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">聽(tīng)st)聽(tīng)</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽(tīng)'聽(tīng)ms';<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr;<br />聽(tīng)}</span></div><br /></span></p> <p> <strong>甯屽皵鎺掑簭鍩烘湰鎬濇兂<br /></strong>銆聽(tīng)聽(tīng)鍏堝彇涓涓皬浜巒鐨勬暣鏁癲<sub>1</sub>浣滀負(fù)絎竴涓閲忥紝鎶婃枃浠剁殑鍏ㄩ儴璁板綍鍒嗘垚d<sub>1</sub>涓粍銆傛墍鏈夎窛紱諱負(fù)d<sub>l</sub>鐨勫嶆暟鐨勮褰曟斁鍦ㄥ悓涓涓粍涓傚厛鍦ㄥ悇緇勫唴榪涜鐩存帴鎻掍漢鎺掑簭錛涚劧鍚庯紝鍙栫浜屼釜澧為噺d<sub>2</sub><d<sub>1</sub>閲嶅涓婅堪鐨勫垎緇勫拰鎺掑簭錛岀洿鑷蟲(chóng)墍鍙栫殑澧為噺d<sub>t</sub>=1(d<sub>t</sub><d<sub>t-l</sub><鈥?lt;d<sub>2</sub><d<sub>1</sub>)錛屽嵆鎵鏈夎褰曟斁鍦ㄥ悓涓緇勪腑榪涜鐩存帴鎻掑叆鎺掑簭涓烘銆?br />聽(tīng) 銆璇ユ柟娉曞疄璐ㄤ笂鏄竴縐嶅垎緇勬彃鍏ユ柟娉曘?/p> <p>聽(tīng)聽(tīng)聽(tīng) 綆楁硶鎻忚堪<br /><span id="6166661" class="code"><p>聽(tīng)</p><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)ShellSort(arr)聽(tīng){聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鎻掑叆鎺掑簭->甯屽効鎺掑簭</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)st聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date();<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)increment聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr.length;<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">do</span><span style="color: rgb(0, 0, 0);">聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)increment聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)(increment</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">|</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)聽(tīng)</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)arr聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)ShellPass(arr,聽(tīng)increment);<br />聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">聽(tīng)(increment聽(tīng)</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)<br /><br />聽(tīng)聽(tīng)status聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date()聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">聽(tīng)st)聽(tīng)</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽(tīng)'聽(tīng)ms';<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr;<br />聽(tīng)}<br />聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)ShellPass(arr,聽(tīng)d)聽(tīng){聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">甯屽効鎺掑簭鍒嗘鎵ц鍑芥暟</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp,聽(tīng)j;<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">d;聽(tīng)i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">arr.length;聽(tīng)i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">((arr[i])聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arr[i</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">d]))聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)temp聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[i];聽(tīng)j聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)i</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">d;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">do</span><span style="color: rgb(0, 0, 0);">聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">d]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[j];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)j聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)j</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">d;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">聽(tīng)(j</span><span style="color: rgb(0, 0, 0);">>-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽(tīng)(temp)聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arr[j]));<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">d]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp;<br />聽(tīng)聽(tīng)聽(tīng)}</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">endif</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr;<br />聽(tīng)}</span></div></span></p> <p> <strong>鍐掓場(chǎng)鎺掑簭鍩烘湰鎬濇兂<br /></strong>聽(tīng)聽(tīng)聽(tīng) 灝嗚鎺掑簭鐨勮褰曟暟緇凴[1..n]鍨傜洿鎺掑垪錛屾瘡涓褰昍[i]鐪嬩綔鏄噸閲忎負(fù)R[i].key鐨勬皵娉°傛牴鎹交姘旀場(chǎng)涓嶈兘鍦ㄩ噸姘旀場(chǎng)涔嬩笅鐨勫師鍒欙紝浠庝笅寰涓婃壂鎻忔暟緇? R錛氬嚒鎵弿鍒拌繚鍙嶆湰鍘熷垯鐨勮交姘旀場(chǎng)錛屽氨浣垮叾鍚戜笂"椋樻誕"銆傚姝ゅ弽澶嶈繘琛岋紝鐩村埌鏈鍚庝換浣曚袱涓皵娉¢兘鏄交鑰呭湪涓婏紝閲嶈呭湪涓嬩負(fù)姝€?br /></p> <p>聽(tīng)聽(tīng)聽(tīng) 綆楁硶鎻忚堪<br /><span id="6161661" class="code">聽(tīng)<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)BubbleSort(arr)聽(tīng){聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">浜ゆ崲鎺掑簭->鍐掓場(chǎng)鎺掑簭</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)st聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date();<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp;<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)exchange;<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽(tīng)i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">arr.length;聽(tīng)i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)exchange聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)j</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">arr.length</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">;聽(tīng)j</span><span style="color: rgb(0, 0, 0);">>=</span><span style="color: rgb(0, 0, 0);">i;聽(tīng)j</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">((arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">])聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arr[j]))聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)temp聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[j];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)exchange聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">exchange)聽(tīng)</span><span style="color: rgb(0, 0, 255);">break</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)status聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date()聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">聽(tīng)st)聽(tīng)</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽(tīng)'聽(tīng)ms';<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr;<br />聽(tīng)}</span></div></span></p> <p> <strong>蹇熸帓搴忓熀鏈濇兂<br /></strong>聽(tīng)聽(tīng)聽(tīng) 灝嗗師闂鍒嗚В涓鴻嫢騫蹭釜瑙勬ā鏇村皬浣嗙粨鏋勪笌鍘熼棶棰樼浉浼肩殑瀛愰棶棰樸傞掑綊鍦拌В榪欎簺瀛愰棶棰橈紝鐒跺悗灝嗚繖浜涘瓙闂鐨勮В緇勫悎涓哄師闂鐨勮В銆?br />聽(tīng)聽(tīng)聽(tīng) 鍦≧[low..high]涓換閫変竴涓褰曚綔涓哄熀鍑?Pivot)錛屼互姝ゅ熀鍑嗗皢褰撳墠鏃犲簭鍖哄垝鍒嗕負(fù)宸︺佸彸涓や釜杈冨皬鐨勫瓙鍖洪棿R[low..pivotpos- 1)鍜孯[pivotpos+1..high]錛屽茍浣垮乏杈瑰瓙鍖洪棿涓墍鏈夎褰曠殑鍏抽敭瀛楀潎灝忎簬絳変簬鍩哄噯璁板綍(涓嶅Θ璁頒負(fù)pivot)鐨勫叧閿瓧 pivot.key錛屽彸杈圭殑瀛愬尯闂翠腑鎵鏈夎褰曠殑鍏抽敭瀛楀潎澶т簬絳変簬pivot.key錛岃屽熀鍑嗚褰昿ivot鍒欎綅浜庢紜殑浣嶇疆(pivotpos)涓婏紝瀹冩棤 欏誨弬鍔犲悗緇殑鎺掑簭銆?/p> <p>聽(tīng)聽(tīng)聽(tīng) 綆楁硶鎻忚堪<br /><span id="6661611" class="code">聽(tīng)<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)QuickSort(arr)聽(tīng){聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">浜ゆ崲鎺掑簭->蹇熸帓搴?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arguments.length</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)low聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arguments[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">];<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)high聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arguments[</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">];<br />聽(tīng)聽(tīng)}聽(tīng)</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);">聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)low聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)high聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr.length</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(low聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)high){<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)function聽(tīng)Partition</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)i聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)low;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)j聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)high;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)pivot聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[i];<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">j)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">j聽(tīng)</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[j]</span><span style="color: rgb(0, 0, 0);">>=</span><span style="color: rgb(0, 0, 0);">pivot)<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)j</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">j)<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[j];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">j聽(tīng)</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[i]</span><span style="color: rgb(0, 0, 0);"><=</span><span style="color: rgb(0, 0, 0);">pivot)<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">j)<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[j</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[i];<br />聽(tīng)聽(tīng)聽(tīng)}</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">endwhile</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)arr[i]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)pivot;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)end聽(tīng)function</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)pivotpos聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)i;聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">Partition(arr錛宭ow錛宧igh);</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)QuickSort(arr,聽(tīng)low,聽(tīng)pivotpos</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br />聽(tīng)聽(tīng)聽(tīng)QuickSort(arr,聽(tīng)pivotpos</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">,聽(tīng)high);<br />聽(tīng)聽(tīng)}聽(tīng)</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr;<br />聽(tīng)}<br /><br />鐩存帴閫夋嫨鎺掑簭鍩烘湰鎬濇兂<br />聽(tīng)聽(tīng)銆n涓褰曠殑鏂囦歡鐨勭洿鎺ラ夋嫨鎺掑簭鍙粡榪噉</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1瓚熺洿鎺ラ夋嫨鎺掑簭寰楀埌鏈夊簭緇撴灉錛?br />聽(tīng)鈶犲垵濮嬬姸鎬侊細(xì)鏃犲簭鍖轟負(fù)R[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">..n]錛屾湁搴忓尯涓虹┖銆?br />聽(tīng)鈶$1瓚熸帓搴?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)鍦ㄦ棤搴忓尯R[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">..n]涓夊嚭鍏抽敭瀛楁渶灝忕殑璁板綍R[k]錛屽皢瀹冧笌鏃犲簭鍖虹殑絎?涓褰昍[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]浜ゆ崲錛屼嬌R[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">..</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]鍜孯[</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">..n]鍒嗗埆鍙樹(shù)負(fù)璁板綍涓暟澧炲姞1涓殑鏂版湁搴忓尯鍜岃褰曚釜鏁板噺灝?涓殑鏂版棤搴忓尯銆?br />銆銆鈥︹?br />聽(tīng)鈶㈢i瓚熸帓搴?br />銆銆絎琲瓚熸帓搴忓紑濮嬫椂錛屽綋鍓嶆湁搴忓尯鍜屾棤搴忓尯鍒嗗埆涓篟[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">..i</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]鍜孯[i..n](</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">鈮鈮</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)銆傝瓚熸帓搴忎粠褰撳墠鏃犲簭鍖轟腑閫夊嚭鍏抽敭瀛楁渶灝忕殑璁板綍R聽(tīng)[k]錛屽皢瀹冧笌鏃犲簭鍖虹殑絎?涓褰昍[i]浜ゆ崲錛屼嬌R[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">..i]鍜孯[i</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">..n]鍒嗗埆鍙樹(shù)負(fù)璁板綍涓暟澧炲姞1涓殑鏂版湁搴忓尯鍜岃褰曚釜鏁板噺灝?涓殑鏂版棤搴忓尯銆?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)榪欐牱錛宯涓褰曠殑鏂囦歡鐨勭洿鎺ラ夋嫨鎺掑簭鍙粡榪噉</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1瓚熺洿鎺ラ夋嫨鎺掑簭寰楀埌鏈夊簭緇撴灉銆?br /><br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)綆楁硶鎻忚堪<br />聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)SelectSort(arr)聽(tīng){聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">閫夋嫨鎺掑簭->鐩存帴閫夋嫨鎺掑簭</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)st聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date();<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp;<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽(tīng)i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">arr.length;聽(tīng)i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)k聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)i;<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)j</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">i</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;聽(tīng)j</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">arr.length;聽(tīng)j</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽(tīng){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">((arr[j])聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)(arr[k]))<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)k聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)j;<br />聽(tīng)聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(k聽(tīng)</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽(tīng)i){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)temp聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[i];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[i]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr[k];<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)arr[k]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)temp;<br />聽(tīng)聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)status聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Date()聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">聽(tīng)st)聽(tīng)</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽(tīng)'聽(tīng)ms';<br />聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)arr;<br />聽(tīng)}<br /></span></div></span></p> <img src ="http://m.tkk7.com/juhongtao/aggbug/131899.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/juhongtao/" target="_blank">javaGrowing</a> 2007-07-23 16:23 <a href="http://m.tkk7.com/juhongtao/archive/2007/07/23/131899.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Dom +銆Javascript 鍦ㄦ湰鏈烘祻瑙堝櫒涓鐨勮〃鏍兼暟鎹繘琛屾帓搴?/title><link>http://m.tkk7.com/juhongtao/archive/2007/07/23/131898.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Mon, 23 Jul 2007 08:20:00 GMT</pubDate><guid>http://m.tkk7.com/juhongtao/archive/2007/07/23/131898.html</guid><wfw:comment>http://m.tkk7.com/juhongtao/comments/131898.html</wfw:comment><comments>http://m.tkk7.com/juhongtao/archive/2007/07/23/131898.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/juhongtao/comments/commentRss/131898.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/juhongtao/services/trackbacks/131898.html</trackback:ping><description><![CDATA[ <h3 id="csscodetitle">Dom +銆Javascript 鍦ㄦ湰鏈烘祻瑙堝櫒涓鐨勮〃鏍兼暟鎹繘琛屾帓搴?/h3> <div style="float: left;"> <script type="text/javascript"> <!-- google_ad_client = "pub-1253167922227550"; google_alternate_ad_url = "http://www.365tech.net/google_adsense_script.htm"; google_ad_width = 336; google_ad_height = 280; google_ad_format = "336x280_as"; google_ad_type = "text"; google_ad_channel ="5362294942"; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "8A3207"; google_color_text = "666666"; google_color_url = "666666"; //--> </script> <script style="display: none;" type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <p>鍦ㄦ湰鏈烘祻瑙堝櫒涓鐨勮〃鏍兼暟鎹繘琛屾帓搴?br />鍦╓eb搴旂敤涓紝鏁版嵁浠庢湇鍔″櫒绔繑鍥炲埌瀹㈡埛绔紝浠ヨ〃鏍煎艦寮忚〃鐜板嚭鏉ャ傚鏋滆瀵規(guī)暟鎹泦鎸夋寚瀹氱殑鍒楁帓搴忔樉紺猴紝甯歌鍋氭硶閮芥槸鍚戞湇鍔″櫒鍙戝嚭璇鋒眰錛屾湇鍔″櫒绔▼搴忛噸鏂頒粠鏁版嵁搴撲腑鍙栧嚭鎸夋寚瀹氬垪鎺掑簭鐨勬暟鎹紝榪斿洖緇欏鎴風(fēng)錛岄〉闈㈤噸鏂版樉紺烘帓搴忓悗鏁版嵁銆?br />聽(tīng)<br />閲囩敤榪欑鏂瑰紡鏈夊涓嬬己鐐癸細(xì)<br />1- 鍝嶅簲鏃墮棿寤惰繜錛屾瘡嬈℃帓搴忛兘瑕佸悜鏈嶅姟鍣ㄧ鍙戦佽姹傦紝絳夊緟緇撴灉榪斿洖錛屽悓鏃跺鍔犵綉緇滆礋杞姐?br />2- 緙栫▼澶嶆潅錛屽彲緇存姢鎬у樊錛岃屼笖瀹㈡埛绔拰鏈嶅姟鍣ㄧ浠g爜鑰﹀悎搴﹀緢楂橈紝瀹㈡埛绔拰鏈嶅姟鍣ㄧ閮借澶勭悊鎺掑簭娑夊強(qiáng)鐨勫垪鍚嶃佹帓搴忔柟寮忥紝濡傛灉鏈夊垎欏靛拰鏌ヨ鏉′歡錛岄兘闇瑕佸湪瀹㈡埛绔〉闈腑淇濈暀錛屾帓搴忚姹傛椂閲嶆柊浼犻掑埌鏈嶅姟鍣ㄧ錛屽綋鍙傛暟鏁伴噺寰堝鏃舵瀬鏄撳嚭閿欍?br />3- 閲嶇敤搴﹀緢浣庯紝閽堝涓嶅悓琛ㄦ牸錛屽緢闅炬娊璞″嚭涓涓叕鍏辯▼搴忔潵鍏辯敤錛岄渶瑕侀愪釜緙栧啓浠g爜瀹炵幇錛屽鍔犲伐浣滈噺銆?br />聽(tīng)<br />鐜板湪鎹竴涓搴﹁冭檻錛屾暟鎹棦鐒跺凡涓嬭澆鍒頒簡(jiǎn)瀹㈡埛绔紝鍦ㄩ噸鏂版帓搴忔椂娌℃湁蹇呰鍐嶉噸鏈嶅姟鍣ㄧ鑾峰彇錛屽彧瑕佸嫻忚鍣ㄤ腑鐨勬暟鎹噸鏂版帓搴忔樉紺哄氨鍙互浜?jiǎn)銆傝瀹炵幇璇ョ洰鏍囷紝闇瑕佸仛鍒頒互涓嬪嚑鐐癸細(xì)<br />1 - 鑾峰緱琛ㄦ牸涓鎺掑簭鐨勬暟鎹紝灝嗗叾鏀懼叆涓涓?緇存暟緇勪腑銆?br />2 - 瀵?緇存暟緇勬帓搴忋?br />3 - 鐢ㄦ帓搴忓悗鐨勬暟鎹噸鏂版洿鏂拌〃鏍箋?br />聽(tīng)<br />鍒╃敤嫻忚鍣ㄦ敮鎸佺殑DOM(Document Object Model)鍜孞avaScript鍗沖彲瀹炵幇涓婅堪鐩爣銆?br />聽(tīng)<br />閫氬父欏甸潰涓細(xì)寰堝鐨?lt;table>錛岃鑾峰緱闇瑕佹帓搴忔暟鎹墍鍦ㄧ殑table錛岄渶瑕佸湪<table>涓鍔犱竴涓猧d灞炴э紝渚夸簬document瀵硅薄鐢╣etElementById寰楀埌璇ヨ〃鏍煎璞★紝渚嬪瑕佹帓搴忕殑琛ㄦ牸瀹氫箟濡備笅錛?br />聽(tīng)<table id="st" ><br />聽(tīng)聽(tīng)聽(tīng) <tr><br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) <td>1</td><br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) <td>2</td><br />聽(tīng)聽(tīng)聽(tīng) </tr><br /></table><br />聽(tīng)<br />鍦╦avascript涓紝鐢╲ar objTable = document.getElementById("st")灝卞彲寰楀埌琛ㄦ牸瀵硅薄錛岃瀵硅薄鍦―OM涓畾涔変負(fù)涓涓狤lement銆?br />聽(tīng)<br />鐒? 鍚庣敤 var objRows = objTable.getElementsByTagName("tr")寰楀埌璇ヨ〃鏍間腑鍏ㄩ儴鐨勮瀵硅薄錛孫bjRows.length榪斿洖璇ヨ〃鏍艱鏁幫紱 var rowi = objRows[i].getElementsByTagName("td")寰楀埌絎琲琛岀殑鍏ㄩ儴<td>鑺傜偣錛宨浠?寮濮嬭鏁幫紝 rowi.item(j)鍒欏彲寰楀埌絎琲琛岋紝絎琷鍒楃殑鑺傜偣錛岃鑺傜偣鐨刬nnerHTML涓鴻鑺傜偣<td></td>涔嬮棿鐨勫唴瀹廣?br />聽(tīng)<br />鑾峰彇琛ㄦ牸鏁版嵁鍒?緇存暟緇勭殑浠g爜瑙佹簮浠g爜錛屾澶勭暐銆?br />聽(tīng)<br />涓嬮潰璇存槑鍦╦avascript涓?緇存暟緇勭殑鏋勯犲拰鎺掑簭銆?br />javascript涓嶆敮鎸?緇存暟緇勶紝鍥犳闇瑕佺敤鏁扮粍鐨勬暟緇勬潵妯℃嫙涓涓?緇存暟緇勶紝鍏舵柟娉曟槸鍏堝畾涔変竴涓?緇存暟緇勶紝鍏冪礌涓暟涓?緇存暟緇勭殑琛屾暟錛岀劧鍚庡姣忎釜鍏冪礌璧嬩竴涓鹼紝鍊間負(fù)涓涓暟緇勶紝鍏跺厓绱犱釜鏁頒負(fù)2緇存暟緇勭殑鍒楁暟銆傛瀯閫犱唬鐮佸涓嬶細(xì)<br />聽(tīng)<br />var rows = new Array(R);聽(tīng) //R涓鴻鏁?br />for(var i = 0; i < rows.length; i++){<br />聽(tīng)聽(tīng)聽(tīng) rows[i] = new Array(C);聽(tīng)聽(tīng)聽(tīng) //C涓哄垪鏁?br />}<br />聽(tīng)<br />聽(tīng)<br />鍒╃敤javascript涓殑Array.sort(comparer)瀵箁ows涓殑鍏冪礌鎺掑簭錛屾瘮杈冩柟寮忕敱閲嶆柊瀹氫箟鐨勬瘮杈冨嚱鏁板緱鍒般傝鏍規(guī)嵁絎琷鍒楀厓绱犵殑澶у皬鎺掑簭錛屽彧瑕佸畾涔夊涓嬪嚱鏁板嵆鍙細(xì)<br />聽(tīng)<br />function compareCol(a,b){<br />聽(tīng)聽(tīng)聽(tīng) <br />聽(tīng)聽(tīng)聽(tīng) if (a[j] < b[j])<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) return -1;<br />聽(tīng)<br />聽(tīng)聽(tīng)聽(tīng) if (a[j] > b[j])<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) return 1;<br />聽(tīng)<br />聽(tīng)聽(tīng) return 0;<br />聽(tīng)<br />}<br />聽(tīng)<br />鍥犱負(fù)compareCol鍙兘鏈変袱涓弬鏁幫紝鍥犳j瑕佸畾涔変負(fù)鍏ㄥ眬鍙橀噺銆?br />聽(tīng)<br />鐢╮ows.sort (compareCol)灝卞彲瀹炵幇鏍規(guī)嵁j鍒楀肩殑澶у皬瀵硅榪涜鎺掑簭銆傛牴鎹甹avascript鏂囨。錛屽瓧絎︿覆姣旇緝澶у皬鏄寜鐓у叾Unicode緙栫爜鐨勫ぇ灝忔潵姣? 杈冿紝瀵硅嫳鏂囨帓搴忔病鏈夐棶棰橈紝瀵逛腑鏂囨帓搴忔椂灝變笉鏄寜閫氬父鐨勬嫾闊蟲(chóng)帓搴忥紝閭i渶瑕乯avascript鎻愪緵鏈湴鍖栨敮鎸侊紝鐩墠娌℃湁鍙戠幇javascript姝ゅ姛鑳姐傝 鍔熻兘鍦╦ava涓彲鐢╦ava.text.Collator瀹炵幇銆?br />聽(tīng)<br />聽(tīng)<br />聽(tīng)浠ヤ笂浠嬬粛浜?jiǎn)鍦ㄦ湰鍦板?guī)祻瑙堝櫒涓殑鏁版嵁榪涜鎺掑簭鐨勪富瑕佹濇兂錛? 涓烘柟渚夸嬌鐢紝灝嗚繖浜涘姛鑳借繘琛屼簡(jiǎn)灝佽錛屼互javascript鍑芥暟鐨勬彁渚涳紝瀛樻斁鍦╯orttable.js鏂囦歡涓紝鍦ㄩ渶瑕佺殑欏甸潰涓敤<script type=text/javascript src='sorttable.js'></script>寮曞叆銆?br />聽(tīng)<br />聽(tīng)<br />聽(tīng)涓嬮潰璇存槑鎺掑簭鍑芥暟鍘熷瀷鍜屼嬌鐢ㄦ柟娉曘?br />聽(tīng)<br />鍑芥暟1 function sortTable(tableId,sortCol,compareType)<br />瀵歸〉闈腑鎸囧畾琛ㄦ牸涓殑鏁版嵁榪涜鎺掑簭錛岄氬父絎竴琛屼負(fù)鏍囬琛岋紝鎺掑簭鏃朵粠絎簩琛屽紑濮嬶紝絎竴嬈¤皟鐢ㄤ負(fù)鍗囧簭鎺掑垪錛岀浜屾涓洪檷搴忔帓鍒楋紝渚濇杞崲銆?br />tableId聽(tīng)聽(tīng)聽(tīng) 涓?lt;table id=''>涓璱d鐨勫鹼紝鍦ㄥ悓涓涓〉闈腑瑕佸敮涓銆?br />sortCol聽(tīng)聽(tīng)聽(tīng) 鎺掑簭鏃剁敤鏉ユ瘮杈冨ぇ灝忕殑鏁版嵁鎵鍦ㄧ殑鍒楋紝浠?寮濮嬭鏁般?br />compareType 鎺掑簭鏃舵瘮杈冨ぇ灝忕殑鏂瑰紡錛宻-鎸夊瓧絎︿覆姣旇緝澶у皬錛宯-鎸夋暟瀛楁瘮杈冨ぇ灝忋?br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)鍑芥暟2 function sortTableInRange(tableId,sortCol,compareType,startRow,endRow,startCol,endCol)<br />聽(tīng)<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 瀵硅〃鏍間腑鎸囧畾鐨勫尯鍩熸暟鎹帓搴忥紝鏈夋椂鏁版嵁絎竴鍒椾負(fù)嫻佹按鍙鳳紝鏈鍚庝竴琛屼負(fù)鍚堣錛岃繖浜涙暟鎹笉闇瑕佸弬涓庢帓搴忥紝鍙敤姝ゅ嚱鏁版潵瀵歸儴鍒嗘暟鎹帓搴忋?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) <br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) tableId聽(tīng)聽(tīng)聽(tīng) 涓?lt;table id=''>涓璱d鐨勫鹼紝鍦ㄥ悓涓涓〉闈腑瑕佸敮涓銆?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) sortCol聽(tīng)聽(tīng)聽(tīng) 鎺掑簭鏃剁敤鏉ユ瘮杈冨ぇ灝忕殑鏁版嵁鎵鍦ㄧ殑鍒楋紝浠?寮濮嬭鏁般?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) compareType 鎺掑簭鏃舵瘮杈冨ぇ灝忕殑鏂瑰紡錛宻-鎸夊瓧絎︿覆姣旇緝澶у皬錛宯-鎸夋暟瀛楁瘮杈冨ぇ灝忋?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) startRow,endRow 瑕佹帓搴忓尯鍩熷紑濮嬪拰緇撴潫琛屽彿錛屼粠1寮濮嬭鏁般備緥濡傚絎?琛屽埌絎?琛屾帓搴忥紝startRow=2錛宔ndRow=7<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) startCol,endCol聽(tīng) 瑕佹帓搴忓尯鍩熷紑濮嬪拰緇撴潫鍒楀彿錛屼粠1寮濮嬭鏁般?br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng) <br />瀛樺湪鐨勯棶棰橈細(xì)<br />1- 涓枃涓嶈兘鎸夋嫾闊蟲(chóng)帓搴忋?br />聽(tīng)<br />聽(tīng)<br />瑕佹敞鎰忕殑闂錛?br />瑕佹帓搴忕殑table蹇呴』鐢↖D鏍囩ず錛屽茍瑕佷綔涓哄弬鏁頒紶緇欐帓搴忓嚱鏁幫紝琛ㄦ牸涓殑鏁版嵁搴旇鏄彲浠ユ帓搴忕殑錛屽惁鍒欑粨鏋滀笉鍙鐭ワ紱瑕佹帓搴忕殑琛ㄦ牸涓嶈兘鏈夊祵濂楄〃錛屽惁鍒欐帓搴忓嚭閿欍?br />聽(tīng)<br />聽(tīng)<br />鏈嚱鏁板凡鍦↖E6.0 ,FireFox1.01涓繍琛岄氳繃銆傛簮浠g爜鍜屼緥瀛愪唬鐮佽鍚庛?br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />鍙傝冭祫鏂欙細(xì)<br />聽(tīng)<br />Danny Goodman with Michael Morrison聽(tīng)聽(tīng) JavaScript Bible 5th聽(tīng) ,John Wiley and Sons聽(tīng) 2004<br />聽(tīng)<br />David Flanagan聽(tīng) JavaScript The Definitive Guide 4th ,聽(tīng) O'Reilly聽(tīng) 2001<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)<br />聽(tīng)闄勬簮浠g爜錛氳榪愯渚嬪瓙錛岄渶瑕佸皢javascript浠g爜淇濆瓨鍒皊orttable.js鏂囦歡涓紝html閮ㄥ垎浠g爜淇濆瓨鍒板悓涓鐩綍涓嬪彟涓鏂囦歡涓嵆鍙?br />聽(tīng)<br />聽(tīng)<br />sorttable.js<br />聽(tīng)<br />聽(tīng)</p> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 128, 128);">聽(tīng)1</span>聽(tīng)<span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">=========================================================</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)2</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//<br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)3</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)聽(tīng)鍦ㄦ湰鏈哄嫻忚鍣ㄩ〉闈㈣〃鏍間腑鐨勬暟鎹榪涜鎺掑簭鐨刯avascript鍑芥暟</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)4</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)5</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)聽(tīng)author聽(tīng)William聽(tīng)聽(tīng)QQ:聽(tīng)22967225</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)6</span>聽(tīng)<span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)聽(tīng)create聽(tīng)date聽(tīng)2005-12-2</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)7</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽(tīng)聽(tīng)version聽(tīng)1.0</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)8</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">=========================================================</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽(tīng)9</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">10</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">column聽(tīng)index聽(tīng)for聽(tīng)sort</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">11</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)indexCol;<br /></span><span style="color: rgb(0, 128, 128);">12</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">姣旇緝鍑芥暟錛岀敤浜嶢rray.sort()鎺掑簭鏃舵瘮杈冪敤銆?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">13</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鏈嚱鏁版瘮杈冩暟緇勫厓绱燼rray1[indexCol]鍜屽厓绱燼rray2[indexCol]Unicode鍊肩殑澶у皬</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">14</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)arrayCompare(array1,array2){<br /></span><span style="color: rgb(0, 128, 128);">15</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">alert(array1.length+"--"+array1[indexCol]);</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">16</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(array1[indexCol]聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)array2[indexCol])<br /></span><span style="color: rgb(0, 128, 128);">17</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">18</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(array1[indexCol]聽(tīng)</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽(tīng)array2[indexCol])<br /></span><span style="color: rgb(0, 128, 128);">19</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">20</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">21</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">22</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">23</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)}<br /></span><span style="color: rgb(0, 128, 128);">24</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">姣旇緝鏁扮粍鍏冪礌array1[indexCol]鍜屽厓绱燼rray2[indexCol]鐨勬暟鍊煎ぇ灝?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">25</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)arrayCompareNumber(array1,array2){<br /></span><span style="color: rgb(0, 128, 128);">26</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">27</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(parseInt(array1[indexCol])聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)parseInt(array2[indexCol]))<br /></span><span style="color: rgb(0, 128, 128);">28</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">29</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(parseInt(array1[indexCol])聽(tīng)</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽(tīng)parseInt(array2[indexCol]))<br /></span><span style="color: rgb(0, 128, 128);">30</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">31</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">32</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">33</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)}<br /></span><span style="color: rgb(0, 128, 128);">34</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">涓巃rrayCompare鐩稿弽鏂瑰紡姣旇緝澶у皬錛岀敤浜庡掑簭浣跨敤</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">35</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)arrayCompareRev(array1,array2){<br /></span><span style="color: rgb(0, 128, 128);">36</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">37</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(array1[indexCol]聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)array2[indexCol])<br /></span><span style="color: rgb(0, 128, 128);">38</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">39</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(array1[indexCol]聽(tīng)</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽(tīng)array2[indexCol])<br /></span><span style="color: rgb(0, 128, 128);">40</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">41</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">42</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">43</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">44</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)}<br /></span><span style="color: rgb(0, 128, 128);">45</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">涓巃rrayCompareNumber鐩稿弽鏂瑰紡姣旇緝澶у皬錛岀敤浜庡掑簭浣跨敤</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">46</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)arrayCompareNumberRev(array1,array2){<br /></span><span style="color: rgb(0, 128, 128);">47</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(parseInt(array1[indexCol])聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)parseInt(array2[indexCol]))<br /></span><span style="color: rgb(0, 128, 128);">48</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">49</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(tīng)(parseInt(array1[indexCol])聽(tīng)</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽(tīng)parseInt(array2[indexCol]))<br /></span><span style="color: rgb(0, 128, 128);">50</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">51</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">52</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">53</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)}<br /></span><span style="color: rgb(0, 128, 128);">54</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">55</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">define聽(tīng)a聽(tīng)2-dimension聽(tīng)array</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">56</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">function</span><span style="color: rgb(0, 0, 0);">聽(tīng)BiArray(rows,cols){<br /></span><span style="color: rgb(0, 128, 128);">57</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">58</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">simulate聽(tīng)multidimension聽(tīng)array</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">59</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.rows聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)rows;<br /></span><span style="color: rgb(0, 128, 128);">60</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.cols聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)cols;<br /></span><span style="color: rgb(0, 128, 128);">61</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)<br /></span><span style="color: rgb(0, 128, 128);">62</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">construct聽(tīng)array</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">63</span>聽(tīng)<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)lines聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Array(rows);<br /></span><span style="color: rgb(0, 128, 128);">64</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">var</span><span style="color: rgb(0, 0, 0);">聽(tīng)i聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;i聽(tīng)</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽(tīng)lines.length;聽(tīng)i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">){<br /></span><span style="color: rgb(0, 128, 128);">65</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)聽(tīng)lines[i]聽(tīng)</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(tīng)</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽(tīng)Array(cols);<br /></span><span style="color: rgb(0, 128, 128);">66</span>聽(tīng)<span style="color: rgb(0, 0, 0);">聽(tīng)聽(tīng)}</span></div> <br />聽(tīng) <img src ="http://m.tkk7.com/juhongtao/aggbug/131898.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/juhongtao/" target="_blank">javaGrowing</a> 2007-07-23 16:20 <a href="http://m.tkk7.com/juhongtao/archive/2007/07/23/131898.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>瑙f瀽responseBodyhttp://m.tkk7.com/juhongtao/archive/2007/05/26/120124.htmljavaGrowingjavaGrowingFri, 25 May 2007 17:07:00 GMThttp://m.tkk7.com/juhongtao/archive/2007/05/26/120124.htmlhttp://m.tkk7.com/juhongtao/comments/120124.htmlhttp://m.tkk7.com/juhongtao/archive/2007/05/26/120124.html#Feedback0http://m.tkk7.com/juhongtao/comments/commentRss/120124.htmlhttp://m.tkk7.com/juhongtao/services/trackbacks/120124.htmlfunction toHtml(strBody,cset)
{
聽(tīng)var Rec=new ActiveXObject("ADODB.RecordSet");
聽(tīng)Rec.Fields.Append("DDD",201,1);
聽(tīng)Rec.Open();
聽(tīng)Rec.AddNew();

聽(tīng)Rec(0).AppendChunk(strBody);

聽(tīng)Rec.Update();
聽(tīng)var HTML=Rec(0).Value;
聽(tīng)Rec.Close();
聽(tīng)delete Rec;
聽(tīng)document.charset=cset;
聽(tīng)return(HTML);
}



]]>
瀹岀編ajax綾匯鏀寔浜嬩歡 http://m.tkk7.com/juhongtao/archive/2007/05/26/120118.htmljavaGrowingjavaGrowingFri, 25 May 2007 16:37:00 GMThttp://m.tkk7.com/juhongtao/archive/2007/05/26/120118.htmlhttp://m.tkk7.com/juhongtao/comments/120118.htmlhttp://m.tkk7.com/juhongtao/archive/2007/05/26/120118.html#Feedback0http://m.tkk7.com/juhongtao/comments/commentRss/120118.htmlhttp://m.tkk7.com/juhongtao/services/trackbacks/120118.html鍑哄錛?a >http://www.smallrain.net/study_show.asp?id=703

<div id="Error"></div>
<div id="State"></div>
<div id="DownloadEnd"></div>
<Script Language="JavaScript">
<!--
// more javascript from http://www.smallrain.net

function Ajax(OnError,OnState,OnDownloadEnd)
{
聽(tīng)// 閿欒瀛楃涓?br />聽(tīng)this.ErrorStr 聽(tīng)聽(tīng)= null;
聽(tīng)// 閿欒浜嬩歡椹卞姩,褰撳彂鐢熼敊璇椂瑙﹀彂
聽(tīng)this.OnError 聽(tīng)聽(tīng)= OnError;
聽(tīng)// 鐘舵佷簨浠墮┍鍔?褰撶姸鎬佹敼鍙樻椂瑙﹀彂
聽(tīng)this.OnState 聽(tīng)聽(tīng)= OnState;
聽(tīng)// 瀹屾垚浜嬩歡椹卞姩,褰撶被鎿嶄綔瀹屾垚鏃惰Е鍙?br />聽(tīng)this.OnDownloadEnd 聽(tīng)= OnDownloadEnd;

聽(tīng)// XMLHTTP 鍙戦佹暟鎹被鍨?GET 鎴?POST
聽(tīng)this.method聽(tīng)聽(tīng)= "GET";
聽(tīng)// 灝嗚鑾峰彇鐨刄RL鍦板潃
聽(tīng)this.URL聽(tīng)聽(tīng)= null;
聽(tīng)// 鎸囧畾鍚屾鎴栧紓姝ヨ鍙栨柟寮?true 涓哄紓姝?false 涓哄悓姝?
聽(tīng)this.sync聽(tīng)聽(tīng)= true;
聽(tīng)// 褰搈ethod 涓?POST 鏃?鎵瑕佸彂閫佺殑鏁版嵁
聽(tīng)this.PostData聽(tīng)聽(tīng)= null
聽(tīng)// 榪斿洖璇誨彇瀹屾垚鍚庣殑鏁版嵁
聽(tīng)this.RetData 聽(tīng)聽(tīng)= null;

聽(tīng)// 鍒涘緩XMLHTTP瀵瑰儚
聽(tīng)this.HttpObj 聽(tīng)聽(tīng)= this.createXMLHttpRequest();
聽(tīng)if(this.HttpObj == null)
聽(tīng){
聽(tīng)聽(tīng)// 瀵瑰儚鍒涘緩澶辮觸鏃朵腑姝㈣繍琛?br />聽(tīng)聽(tīng)return;
聽(tīng)}

聽(tīng)var Obj = this;
聽(tīng)// 璋冪敤浜嬩歡媯(gè)嫻?br />聽(tīng)this.HttpObj.onreadystatechange = function()
聽(tīng){
聽(tīng)聽(tīng)Ajax.handleStateChange(Obj);
聽(tīng)}
}

// UTF 杞叆 GB (by:Rimifon)
Ajax.prototype.UTFTOGB = function(strBody)
{
聽(tīng)var Rec=new ActiveXObject("ADODB.RecordSet");
聽(tīng)Rec.Fields.Append("DDD",201,1);
聽(tīng)Rec.Open();
聽(tīng)Rec.AddNew();
聽(tīng)Rec(0).AppendChunk(strBody);
聽(tīng)Rec.Update();
聽(tīng)var HTML=Rec(0).Value;
聽(tīng)Rec.Close();
聽(tīng)delete Rec;
聽(tīng)return(HTML);
}

// 鍒涘緩XMLHTTP瀵瑰儚
Ajax.prototype.createXMLHttpRequest = function()
{
聽(tīng)if (window.XMLHttpRequest)
聽(tīng){
聽(tīng)聽(tīng)//Mozilla 嫻忚鍣?br />聽(tīng)聽(tīng)return new XMLHttpRequest();
聽(tīng)}
聽(tīng)else if (window.ActiveXObject)
聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)var msxmls = new Array('Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)for (var i = 0; i < msxmls.length; i++)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)try
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)return new ActiveXObject(msxmls[i]);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)}catch (e){}

聽(tīng)聽(tīng)}
聽(tīng)}
聽(tīng)this.ErrorStr = "浣犵殑嫻忚鍣ㄤ笉鏀寔XMLHttpRequest瀵硅薄錛?
聽(tīng)if(this.OnError)
聽(tīng){
聽(tīng)聽(tīng)this.OnError(this.ErrorStr);
聽(tīng)}
聽(tīng)聽(tīng)聽(tīng) 聽(tīng)return null;
}

// 鍙戦丠TTP璇鋒眰
Ajax.prototype.send = function()
{

聽(tīng)if (this.HttpObj !== null)
聽(tīng){
聽(tīng)聽(tīng)this.URL = this.URL + "?t=" + new Date().getTime();
聽(tīng)聽(tīng)this.HttpObj.open(this.method, this.URL, this.sync);
聽(tīng)聽(tīng)if(this.method.toLocaleUpperCase() == "GET")
聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)this.HttpObj.send(null);
聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)else if(this.method.toLocaleUpperCase() == "POST")
聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)this.HttpObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
聽(tīng)聽(tīng)聽(tīng)this.HttpObj.send(this.PostData);
聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)else
聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)this.ErrorStr = "閿欒鐨刐method]鍛戒護(hù)錛?
聽(tīng)聽(tīng)聽(tīng)if(this.OnError)
聽(tīng)聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)this.OnError(this.ErrorStr);
聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)return;
聽(tīng)聽(tīng)}

聽(tīng)聽(tīng)if (this.HttpObj.readyState == 4)
聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)// 鍒ゆ柇瀵硅薄鐘舵?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)if (this.HttpObj.status == 200)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)this.RetData = this.UTFTOGB(this.HttpObj.responseBody);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)if(this.OnDownloadEnd)
聽(tīng)聽(tīng)聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)this.OnDownloadEnd(this.RetData);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)return;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)else
聽(tīng)聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)this.ErrorStr = "鎮(zhèn)ㄦ墍璇鋒眰鐨勯〉闈㈡湁寮傚父錛?
聽(tīng)聽(tīng)聽(tīng)聽(tīng)if(this.OnError)
聽(tīng)聽(tīng)聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)this.OnError(this.ErrorStr);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)return;
聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)}

聽(tīng)}

}

// 浜嬩歡媯(gè)嫻?br />Ajax.handleStateChange = function(Obj)
{
聽(tīng)if(Obj.OnState)
聽(tīng){
聽(tīng)聽(tīng)Obj.OnState(Obj.HttpObj.readyState);
聽(tīng)}

聽(tīng)if (Obj.HttpObj.readyState == 4)
聽(tīng){
聽(tīng)聽(tīng)// 鍒ゆ柇瀵硅薄鐘舵?br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)if (Obj.HttpObj.status == 200)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) {
聽(tīng)聽(tīng)聽(tīng)Obj.RetData = Obj.UTFTOGB(Obj.HttpObj.responseBody);
聽(tīng)聽(tīng)聽(tīng)if(Obj.OnDownloadEnd)
聽(tīng)聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)Obj.OnDownloadEnd(Obj.RetData);
聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) return;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) }
聽(tīng)聽(tīng)else
聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)Obj.ErrorStr = "鎮(zhèn)ㄦ墍璇鋒眰鐨勯〉闈㈡湁寮傚父錛?
聽(tīng)聽(tīng)聽(tīng)if(Obj.OnError)
聽(tīng)聽(tīng)聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)Obj.OnError(Obj.ErrorStr);
聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)return;
聽(tīng)聽(tīng)}
聽(tīng)}
}


// 閿欒鍥炶皟浜嬩歡鍑芥暟
function EventError(strValue)
{
聽(tīng)document.getElementById("Error").innerHTML = strValue;
}

// 鐘舵佸洖璋冧簨浠跺嚱鏁?br />function EventState(strValue)
{
聽(tīng)var strState = null;
聽(tīng)switch (strValue)
聽(tīng){
聽(tīng)聽(tīng) 聽(tīng)聽(tīng)case 0:
聽(tīng)聽(tīng)strState = "鏈垵濮嬪寲...";
聽(tīng)聽(tīng)break;

聽(tīng)聽(tīng) 聽(tīng)聽(tīng)case 1:
聽(tīng)聽(tīng)strState = "寮濮嬭鍙栨暟鎹?..";
聽(tīng)聽(tīng)break;

聽(tīng)聽(tīng) 聽(tīng)聽(tīng)case 2:
聽(tīng)聽(tīng)strState = "璇誨彇鏁版嵁...";
聽(tīng)聽(tīng)break;

聽(tīng)聽(tīng) 聽(tīng)聽(tīng)case 3:
聽(tīng)聽(tīng)strState = "璇誨彇鏁版嵁涓?..";
聽(tīng)聽(tīng)break;

聽(tīng)聽(tīng) 聽(tīng)聽(tīng)case 4:
聽(tīng)聽(tīng)strState = "璇誨彇瀹屾垚...";
聽(tīng)聽(tīng)break;

聽(tīng)聽(tīng) 聽(tīng)聽(tīng)default:
聽(tīng)聽(tīng)strState = "鏈垵濮嬪寲...";
聽(tīng)聽(tīng)break;
聽(tīng)}
聽(tīng)document.getElementById("State").innerHTML = strState;
}

// 瀹屾垚鍥炶皟浜嬩歡鍑芥暟
function EventDownloadEnd(strValue)
{
聽(tīng)document.getElementById("DownloadEnd").innerHTML = strValue;
}


// 鍒濆鍖朅jax瀵瑰儚,寮曞叆浜嬩歡鍥炶皟鍑芥暟
var A1 = new Ajax(EventError,EventState,EventDownloadEnd);
// 鎸囧畾method鏁版嵁鍙戦佺被鍨?br />A1.method = "GET";
// 鎸囧畾URL鍦板潃
A1.URL = "// 鎸囧畾涓哄紓姝ュ鐞?br />A1.sync = true;
//鍙戦佽姹?br />A1.send();
//-->
</Script>聽(tīng)



]]>
ajax浠g悊紼嬪簭鑷姩鍒ゆ柇瀛楃緙栫爜 http://m.tkk7.com/juhongtao/archive/2007/05/26/120115.htmljavaGrowingjavaGrowingFri, 25 May 2007 16:31:00 GMThttp://m.tkk7.com/juhongtao/archive/2007/05/26/120115.htmlhttp://m.tkk7.com/juhongtao/comments/120115.htmlhttp://m.tkk7.com/juhongtao/archive/2007/05/26/120115.html#Feedback0http://m.tkk7.com/juhongtao/comments/commentRss/120115.htmlhttp://m.tkk7.com/juhongtao/services/trackbacks/120115.htmlajax浠g悊紼嬪簭鑷姩鍒ゆ柇瀛楃緙栫爜

浣滆咃細(xì)llinzzi銆鏃墮棿錛?2006-03-16銆鏂囨。綾誨瀷錛氬師鍒涖鏉ヨ嚜錛?a >钃濊壊鐞嗘兂
嫻忚緇熻 total:6402 | year:1609 | Quarter:376 | Month:132 | Week:26 | today:2

鐢變簬ajax鍦ㄨ法鍩熺殑璁塊棶涓婃湁闂,鐩墠鏈濂界殑鏂規(guī)硶鏄仛浠g悊.鍐欎簡(jiǎn)涓唬鐞嗙▼搴忓拰蹇?jī)寰?

涓轟簡(jiǎn)鍋歛jax鐨勪唬鐞?鐮旂┒浜?jiǎn)涓嬫湇鍔″櫒绔殑xmlhttp騫跺拰瀹㈡埛绔殑ajax涓殑xmlhttp鍋氫簡(jiǎn)涓瘮杈?鍚庡彴浠g爜鏄痑sp鐨?

鏈嶅姟鍣ㄧ鐨剎mlhttp涔熷氨鏄痑sp灝忓伔紼嬪簭,鎴戞妸浠g爜鏀規(guī)垚浜?jiǎn)javascript.

1.鍦ㄦ湇鍔″櫒绔殑xmlhttp.Open("GET",url,false)寮傛蹇呴』鏄叧闂殑,鑰屽鎴風(fēng)鐨勫紓姝ユ槸鎵撳紑鐨?榪欎釜寰堝ソ鐞嗚В.
2.鍦ㄦ湇鍔″櫒绔殑xmlhttp.Responsebody 榪欓噷鐢ㄧ殑鏄疪esponsebody鑰屼笉鏄疪esponseText鎴朢esponseXml,涓寮濮嬫垜鏄敤ResponseText,浣嗗湪鍑芥暟bytesToBSTR杞崲緙栫爜鐨勬椂鍊欐彁紺洪敊璇?緇忚繃姣旇緝鍙戠幇鍏朵粬鐨刟sp灝忓伔紼嬪簭閲岀殑浠g爜閮芥槸Responsebody,鍒嗘瀽鍚?鍙戠幇body榪斿洖鏉ョ殑鏄簩榪涘埗鏁版嵁鑰屼笉鏄儚ResponseText鎴朢esponseXml閭f牱榪斿洖瀛楃鎴杁om瀵硅薄.

ajax鐨刟sp浠g悊鍑芥暟浠嬬粛:
send_request(url) ,url涓哄湴鍧

鏈嶅姟鍣ㄧ浠g爜濡備笅甯﹁嚜鍔ㄥ垽鏂墍鏈夊瓧絎︾紪鐮?宸叉祴璇?鏃ヨ 闊╄ 綣佷綋:

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>XMLHTTP</title>
</head>
<%

聽(tīng)

Server.ScriptTimeout=9999999;
function send_request(url) {
聽(tīng)var codedtext;
聽(tīng)http_request = Server.CreateObject("Microsoft.XMLHTTP");
聽(tīng)http_request.Open("GET",url,false);
聽(tīng)http_request.Send(null);
聽(tīng)if (http_request.ReadyState == 4){
聽(tīng)聽(tīng)//鑷姩鍒ゆ柇緙栫爜寮濮?br />聽(tīng)聽(tīng)var charresult = http_request.ResponseText.match(/CharSet=(\S+)\">/i);
聽(tīng)聽(tīng)if (charresult != null){
聽(tīng)聽(tīng)var Cset = charresult[1];
聽(tīng)聽(tīng)}else{Cset = "gb2312"}//瀵硅幏鍙栦笉鍒扮殑緗戠珯閲囩敤gb2312緙栫爜,鍙嚜琛屾洿鏀?br />聽(tīng)聽(tīng)
//鑷姩鍒ゆ柇緙栫爜緇撴潫
聽(tīng)聽(tīng)codedtext = bytesToBSTR(http_request.Responsebody,Cset);
聽(tīng)聽(tīng)}else{
聽(tīng)聽(tīng)codedtext = "Erro";
聽(tīng)聽(tīng)}
聽(tīng)return(codedtext);
}

function bytesToBSTR(body,Cset){
var objstream;
objstream = Server.CreateObject("Adodb.Stream");
objstream.Type = 1;
objstream.Mode = 3;
objstream.Open();
objstream.Write(body);
objstream.Position = 0;
objstream.Type = 2;
objstream.Charset = Cset;
bytesToBSTR = objstream.Readtext;
objstream.Close;
return(bytesToBSTR);
}

%>
<body>
<% Response.Write(send_request("http://www.daum.net")) %>
</body>
</html>



]]>
閫氱敤js鏍¢獙綾?/title><link>http://m.tkk7.com/juhongtao/archive/2006/11/15/81244.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Wed, 15 Nov 2006 05:50:00 GMT</pubDate><guid>http://m.tkk7.com/juhongtao/archive/2006/11/15/81244.html</guid><wfw:comment>http://m.tkk7.com/juhongtao/comments/81244.html</wfw:comment><comments>http://m.tkk7.com/juhongtao/archive/2006/11/15/81244.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/juhongtao/comments/commentRss/81244.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/juhongtao/services/trackbacks/81244.html</trackback:ping><description><![CDATA[ <table class="tablenormal"> <tbody> <tr> <td> <table class="overflow"> <tbody> <tr> <td height="150" valign="top"> common.js <br /><br /><br /><pre class="overflow"> //鎵╁睍String綾誨姛鑳?br />//鍒犻櫎瀛楃涓蹭簩杈圭┖鏍?br />聽(tīng)聽(tīng) String.prototype.trim = function()<br />聽(tīng)聽(tīng) {<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)return this.replace(/(^[\s]*)|([\s]*$)/g, "");<br />聽(tīng)聽(tīng) };<br />聽(tīng)聽(tīng) //鍒犻櫎瀛楃涓插乏杈圭┖鏍?br />聽(tīng)聽(tīng) String.prototype.lTrim = function()<br />聽(tīng)聽(tīng) {<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)return this.replace(/(^[\s]*)/g, "");<br />聽(tīng)聽(tīng) };<br />聽(tīng)聽(tīng) //鍒犻櫎瀛楃涓插彸杈圭┖鏍?br />聽(tīng)聽(tīng) String.prototype.rTrim = function()<br />聽(tīng)聽(tīng) {<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)return this.replace(/([\s]*$)/g, "");<br />聽(tīng)聽(tīng) };</pre><br />--------------------------------------------------------------------- <br />chkUtil.js <br /><br /><pre class="overflow"> //瀹氫箟涓涓彲闈?rùn)鎬佽皟鐢ㄦ柟娉曠殑js綾?br />function ChkUtil() { }<br />//鏍¢獙鏄惁涓虹┖(鍏堝垹闄や簩杈圭┖鏍煎啀楠岃瘉)<br />ChkUtil.isNull = function (str) {<br /> if (null == str ||聽(tīng)聽(tīng)""== str.trim()) {<br />聽(tīng)聽(tīng)return true;<br /> } else {<br />聽(tīng)聽(tīng)return false;<br /> }<br />};<br />//鏍¢獙鏄惁鍏ㄦ槸鏁板瓧<br />ChkUtil.isDigit聽(tīng)聽(tīng)= function (str) {<br /> var patrn=/^\d+$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鏄惁鏄暣鏁?br />ChkUtil.isInteger = function (str) {<br /> var patrn=/^([+-]?)(\d+)$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鏄惁涓烘鏁存暟<br />ChkUtil.isPlusInteger = function (str) {<br /> var patrn=/^([+]?)(\d+)$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鏄惁涓鴻礋鏁存暟<br />ChkUtil.isMinusInteger = function (str) {<br /> var patrn=/^-(\d+)$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鏄惁涓烘誕鐐規(guī)暟<br />ChkUtil.isFloat=function(str){<br /> var patrn=/^([+-]?)\d*\.\d+$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鏄惁涓烘嫻偣鏁?br />ChkUtil.isPlusFloat=function(str){<br />聽(tīng)聽(tīng)var patrn=/^([+]?)\d*\.\d+$/;<br />聽(tīng)聽(tīng)return patrn.test(str);<br />};<br />//鏍¢獙鏄惁涓鴻礋嫻偣鏁?br />ChkUtil.isMinusFloat=function(str){<br />聽(tīng)聽(tīng)var patrn=/^-\d*\.\d+$/;<br />聽(tīng)聽(tīng)return patrn.test(str);<br />};<br />//鏍¢獙鏄惁浠呬腑鏂?br />ChkUtil.isChinese=function(str){<br /> var patrn=/[\u4E00-\u9FA5\uF900-\uFA2D]+$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鏄惁浠匒CSII瀛楃<br />ChkUtil.isAcsii=function(str){<br />var patrn=/^[\x00-\xFF]+$/;<br />return patrn.test(str);<br />};<br />//鏍¢獙鎵嬫満鍙風(fēng)爜<br />ChkUtil.isMobile = function (str) {<br /> var patrn = /^0?1((3[0-9]{1})|(59)){1}[0-9]{8}$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鐢?shù)璇濆忥L(fēng)爜<br />ChkUtil.isPhone = function (str) {<br /> var patrn = /^(0[\d]{2,3}-)?\d{6,8}(-\d{3,4})?$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙URL鍦板潃<br />ChkUtil.isUrl=function(str){<br />var patrn= /^http[s]?:\/\/[\w-]+(\.[\w-]+)+([\w-\.\/?%&=]*)?$/;<br />return patrn.test(str);<br />};<br />//鏍¢獙鐢?shù)閭湴鍧<br />ChkUtil.isEmail = function (str) {<br /> var patrn = /^[\w-]+@[\w-]+(\.[\w-]+)+$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙閭紪<br />ChkUtil.isZipCode = function (str) {<br /> var patrn = /^\d{6}$/;<br /> return patrn.test(str);<br />};<br />//鏍¢獙鍚堟硶鏃墮棿<br />ChkUtil.isDate = function (str) {<br />聽(tīng)聽(tīng)if(!/\d{4}(\.|\/|\-)\d{1,2}(\.|\/|\-)\d{1,2}/.test(str)){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)return false;<br />聽(tīng)聽(tīng)}<br />聽(tīng)聽(tīng)var r = str.match(/\d{1,4}/g);<br />聽(tīng)聽(tīng)if(r==null){return false;};<br />聽(tīng)聽(tīng)var d= new Date(r[0], r[1]-1, r[2]);<br />聽(tīng)聽(tīng)return (d.getFullYear()==r[0]&&(d.getMonth()+1)==r[1]&&d.getDate()==r[2]);<br />};<br />//鏍¢獙瀛楃涓詫細(xì)鍙兘杈撳叆6-20涓瓧姣嶃佹暟瀛椼佷笅鍒掔嚎(甯哥敤鎵嬫牎楠岀敤鎴峰悕鍜屽瘑鐮?<br />ChkUtil.isString6_20=function(str){<br /> var patrn=/^(\w){6,20}$/;<br /> return patrn.test(str);<br />};</pre><br />------------------------------------------------------------------ <br />璋冪敤紺轟緥 <br /><pre class="overflow"><br />聽(tīng)聽(tīng)<script type='text/javascript' src='./common.js'></script><br />聽(tīng)聽(tīng)<script type='text/javascript' src='./chkUtil.js'></script><br />聽(tīng)聽(tīng)<script type='text/javascript'><br />聽(tīng)聽(tīng) function $F(id){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)if(ChkUtil.isNull(id)){alert("鍑芥暟$F()鐨勫弬鏁頒笉鑳戒負(fù)絀?);return false;}<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)return document.getElementById(id).value;<br />聽(tīng)聽(tīng) }<br />聽(tīng)聽(tīng) function test(){<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)var area=$F("area");<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)if(area==false)return;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)alert(ChkUtil.isDate(area));//鍒ゆ柇鏄惁鏄悎娉曟棩鏈?br />聽(tīng)聽(tīng) }</pre></td> </tr> </tbody> </table> </td> </tr> <!-- user pen --> <tr> <td> <br /> </td> </tr> <!-- submit time --> <tr> <td> <table class="tablenormal"> <tbody> <tr> <td width="80%"> <div id="tphxssa" class="thread_time">聽(tīng)聽(tīng)聽(tīng)聽(tīng)</div> <span id="yahgxuk" class="gray"> <label>鍙戣〃鏃墮棿:2006-10-28 13:01</label> </span> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <img src ="http://m.tkk7.com/juhongtao/aggbug/81244.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/juhongtao/" target="_blank">javaGrowing</a> 2006-11-15 13:50 <a href="http://m.tkk7.com/juhongtao/archive/2006/11/15/81244.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>javascript 鎿嶄綔 excelhttp://m.tkk7.com/juhongtao/archive/2006/11/09/80259.htmljavaGrowingjavaGrowingThu, 09 Nov 2006 13:24:00 GMThttp://m.tkk7.com/juhongtao/archive/2006/11/09/80259.htmlhttp://m.tkk7.com/juhongtao/comments/80259.htmlhttp://m.tkk7.com/juhongtao/archive/2006/11/09/80259.html#Feedback0http://m.tkk7.com/juhongtao/comments/commentRss/80259.htmlhttp://m.tkk7.com/juhongtao/services/trackbacks/80259.htmlvar i,j;
聽(tīng) 聽(tīng)try {
聽(tīng) 聽(tīng) 聽(tīng)var xls 聽(tīng) 聽(tīng)= new ActiveXObject ( "Excel.Application" );
聽(tīng) 聽(tīng) }
聽(tīng) 聽(tīng)catch(e) {
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) alert( "瑕佹墦鍗拌琛紝鎮(zhèn)ㄥ繀欏誨畨瑁匛xcel鐢?shù)瀛愯〃鏍艰蒋錃g錛屽悓鏃舵祻瑙堝櫒欏諱嬌鐢ㄢ淎ctiveX 鎺т歡鈥濓紝鎮(zhèn)ㄧ殑嫻忚鍣ㄩ』鍏佽鎵ц鎺т歡銆?璇風(fēng)偣鍑匯愬府鍔┿戜簡(jiǎn)瑙f祻瑙堝櫒璁劇疆鏂規(guī)硶錛?);
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng)return "";
聽(tīng) 聽(tīng) }

聽(tīng) 聽(tīng)xls.visible =true; 聽(tīng)//璁劇疆excel涓哄彲瑙?

聽(tīng) 聽(tīng)var xlBook = xls.Workbooks.Add;
聽(tīng) 聽(tīng)var xlsheet = xlBook.Worksheets(1);
聽(tīng) 聽(tīng)
聽(tīng) 聽(tīng) 聽(tīng)xlsheet.Range(xlsheet.Cells(1,1),xlsheet.Cells(1,7)).mergecells=true;
聽(tīng) 聽(tīng) 聽(tīng)xlsheet.Range(xlsheet.Cells(1,1),xlsheet.Cells(1,7)).value="鍙戝崱璁板綍";
聽(tīng) 聽(tīng) // 聽(tīng)xlsheet.Range(xlsheet.Cells(1,1),xlsheet.Cells(1,6)).Interior.ColorIndex=5;//璁劇疆搴曡壊涓鴻摑鑹?
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng)// 聽(tīng) xlsheet.Range(xlsheet.Cells(1,1),xlsheet.Cells(1,6)).Font.ColorIndex=4;//璁劇疆瀛椾綋鑹?聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng)
聽(tīng) // xlsheet.Rows(1). Interior .ColorIndex = 5 ;//璁劇疆搴曡壊涓鴻摑鑹?聽(tīng)璁劇疆鑳屾櫙鑹?Rows(1).Font.ColorIndex=4 聽(tīng)

聽(tīng) 聽(tīng)
聽(tīng) 聽(tīng)xlsheet.Rows(1).RowHeight = 25;
聽(tīng) 聽(tīng)
聽(tīng) 聽(tīng)xlsheet.Rows(1).Font.Size=14;
聽(tīng) 聽(tīng)
聽(tīng) 聽(tīng)xlsheet.Rows(1).Font.Name="榛戜綋";
聽(tīng) 聽(tīng)

聽(tīng) 聽(tīng)xlsheet.Columns("A:D").ColumnWidth =18;
聽(tīng) 聽(tīng)
聽(tīng) 聽(tīng)// xlsheet.Range(xlsheet.Cells(i, 4), xlsheet.Cells(i-1, 6)).BorderAround , 4
聽(tīng) 聽(tīng) // for(mn=1,mn<=6;mn++) . 聽(tīng) 聽(tīng) xlsheet.Range(xlsheet.Cells(1, mn), xlsheet.Cells(i1, j)).Columns.AutoFit;
聽(tīng) 聽(tīng) 聽(tīng)xlsheet.Columns.AutoFit;
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) xlsheet.Range( xlsheet.Cells(1,1),xlsheet.Cells(rowNum+1,7)).HorizontalAlignment =-4108;//灞呬腑
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) xlsheet.Range( xlsheet.Cells(1,1),xlsheet.Cells(1,7)).VerticalAlignment =-4108;
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) xlsheet.Range( xlsheet.Cells(2,1),xlsheet.Cells(rowNum+1,7)).Font.Size=10;

聽(tīng) 聽(tīng) 聽(tīng)xlsheet.Range( xlsheet.Cells(2,1),xlsheet.Cells(rowNum+1,7)).Borders(3).Weight = 2; //璁劇疆宸﹁竟璺?
聽(tīng) 聽(tīng) 聽(tīng) xlsheet.Range( xlsheet.Cells(2,1),xlsheet.Cells(rowNum+1,7)).Borders(4).Weight = 2;//璁劇疆鍙寵竟璺?
聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) 聽(tīng) xlsheet.Range( xlsheet.Cells(2,1),xlsheet.Cells(rowNum+1,7)).Borders(1).Weight = 2;//璁劇疆欏惰竟璺?
聽(tīng) 聽(tīng) 聽(tīng) xlsheet.Range( xlsheet.Cells(2,1),xlsheet.Cells(rowNum+1,7)).Borders(2).Weight = 2;//璁劇疆搴曡竟璺?
xls.UserControl = true; 聽(tīng)//寰堥噸瑕?涓嶈兘鐪佺暐,涓嶇劧浼?xì)鍑洪棶棰?鎰忔濇槸excel浜ょ敱鐢ㄦ埛鎺у埗
聽(tīng) 聽(tīng) 聽(tīng) xls=null;
聽(tīng) 聽(tīng) 聽(tīng) xlBook=null;
聽(tīng) 聽(tīng) 聽(tīng) xlsheet=null;

}


]]>
鏇存敼IE嫻忚鍣ㄩ粯璁ょ殑婧愭枃浠剁紪杈戝櫒http://m.tkk7.com/juhongtao/archive/2006/11/06/79468.htmljavaGrowingjavaGrowingMon, 06 Nov 2006 12:19:00 GMThttp://m.tkk7.com/juhongtao/archive/2006/11/06/79468.htmlhttp://m.tkk7.com/juhongtao/comments/79468.htmlhttp://m.tkk7.com/juhongtao/archive/2006/11/06/79468.html#Feedback0http://m.tkk7.com/juhongtao/comments/commentRss/79468.htmlhttp://m.tkk7.com/juhongtao/services/trackbacks/79468.html鐢ㄦ埛鍦ㄦ祻瑙堢綉欏墊椂錛屽鏋滃湪緗戦〉涓崟鍑婚紶鏍囧彸閿茍閫夋嫨鑿滃崟涓殑鈥滄煡鐪嬫簮鏂囦歡鈥濋夐」鍚庯紝緋葷粺灝變細(xì)璋冪敤璁頒簨鏈墦寮璇ョ綉欏電殑HTML婧愭枃浠訛紝鐢ㄦ埛鍙互閫氳繃淇敼娉ㄥ唽琛ㄦ潵鏇存敼榛樿鐨勬墦寮紼嬪簭錛岀劧鍚庡涓嬶細(xì)
涓錛氭墦寮娉ㄥ唽琛ㄣ?br />鈥滃紑濮嬧濊彍鍗?>鈥滆繍琛屸?>杈撳叆 regedit 鐒跺悗鐐圭‘瀹氥?br />浜岋細(xì)鎵撳紑HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\INTERNET EXPLORER,鍦ㄥ叾涓嬫柊寤轟竴涓富閿?View Source Editor",鍦ㄥ叾涓嬪啀鏂頒竴涓富閿?Editor Name",鍙堝嚮鍙充晶紿楀彛涓殑"榛樿"灝嗘暟鍊艱涓烘洿鎹㈢▼搴忕殑璺緞鍙?qiáng)鏂囦欢鍚?

涓?閲嶆柊鍚姩INTERNET EXPLORER,鏌ョ湅鏌愪釜緗戦〉鐨勬簮鏂囦歡,鐢ㄦ埛灝變細(xì)鍙戠幇鎵撳紑鐨勭▼搴忓凡緇忔洿鏀逛簡(jiǎn).

]]>
紱佹window.close()鏂規(guī)硶寮瑰嚭鐨勮闂獥http://m.tkk7.com/juhongtao/archive/2006/11/06/79354.htmljavaGrowingjavaGrowingMon, 06 Nov 2006 03:39:00 GMThttp://m.tkk7.com/juhongtao/archive/2006/11/06/79354.htmlhttp://m.tkk7.com/juhongtao/comments/79354.htmlhttp://m.tkk7.com/juhongtao/archive/2006/11/06/79354.html#Feedback0http://m.tkk7.com/juhongtao/comments/commentRss/79354.htmlhttp://m.tkk7.com/juhongtao/services/trackbacks/79354.html

聽(tīng)

< script聽(tīng)language = " javascript " >
window.moveTo(
2000 , 2000 );聽(tīng)
var 聽(tīng)para聽(tīng) = 聽(tīng)window.location.search;聽(tīng)
var 聽(tīng)width聽(tīng) = screen.availWidth;聽(tīng)
var 聽(tīng)height聽(tīng) = 聽(tīng)screen.availHeight;聽(tīng)

var 聽(tīng)arg聽(tīng) = 聽(tīng)window.showModalDialog('ChooseEstate.htm' + para,window,'dialogWidth:' + width + 'px;dialogHeight:' + height + 'px;help: 0 ;');聽(tīng)

window.close();聽(tīng)
</ script >

錛嶏紞錛嶏紞浣跨敤浠ヤ笂浠g爜錛屼細(xì)寮瑰嚭涓涓闂獥鍙o紝鏄惁鍏抽棴褰撳墠紿楀彛錛屾垜浠彧瑕佺◢鍋氭洿鏀癸紝灝卞彲閬胯繃榪欎釜鏈哄埗錛?

< script聽(tīng)language = " javascript " >
window.moveTo(
2000 , 2000 );聽(tīng)
var 聽(tīng)para聽(tīng) = 聽(tīng)window.location.search;聽(tīng)
var 聽(tīng)width聽(tīng) = screen.availWidth;聽(tīng)
var 聽(tīng)height聽(tīng) = 聽(tīng)screen.availHeight;聽(tīng)


var 聽(tīng)arg聽(tīng) = 聽(tīng)window.showModalDialog('ChooseEstate.htm' + para,window,'dialogWidth:' + width + 'px;dialogHeight:' + height + 'px;help: 0 ;');聽(tīng)
window.opener聽(tīng)
= 聽(tīng)window;聽(tīng)鎴杦indow.opener=null;
window.close();聽(tīng)
</ script >



]]>
javascript涓殑緙栫爜涓庤В鐮?/title><link>http://m.tkk7.com/juhongtao/archive/2006/11/03/78936.html</link><dc:creator>javaGrowing</dc:creator><author>javaGrowing</author><pubDate>Fri, 03 Nov 2006 07:49:00 GMT</pubDate><guid>http://m.tkk7.com/juhongtao/archive/2006/11/03/78936.html</guid><wfw:comment>http://m.tkk7.com/juhongtao/comments/78936.html</wfw:comment><comments>http://m.tkk7.com/juhongtao/archive/2006/11/03/78936.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/juhongtao/comments/commentRss/78936.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/juhongtao/services/trackbacks/78936.html</trackback:ping><description><![CDATA[ <p> <span twffan="done">javascript涓彲鐢ㄧ殑緙栫爜瑙g爜鍑芥暟錛屾湁濡備笅鐨勭粍鍚堬細(xì)</span> <br /> </p> <ul> <li> <span twffan="done">escape(string);</span> <br /> <span twffan="done">unescape(string);</span> </li> <li> <span twffan="done">encodeURI(string);</span> <br /> <span twffan="done">decodeURI(string);</span> </li> <li> <span twffan="done">encodeURIComponent(string);</span> <br /> <span twffan="done">decodeURIComponent(string);</span> </li> </ul> <p> <span twffan="done">浠栦滑涔嬮棿鐨勫尯鍒負(fù)錛?/span> </p> <p> <span twffan="done">escape/unescape錛?/span> <br /> <span twffan="done">浠?6榪涘埗緙栫爜瀛楃涓詫紝瀵圭┖鏍箋佺鍙風(fēng)瓑瀛楃鐢?xx緙栫爜琛ㄧず錛屽涓枃絳夊瓧絎︾敤%uxxxx緙栫爜琛ㄧず銆傝嚜javascript1.5涔嬪悗錛屾鏂規(guī)硶宸茬粡涓嶈鎺ㄨ崘浣跨敤銆?/span> </p> <p> <span twffan="done">encodeURI/decodeURI錛?/span> <br /> <span twffan="done">浠TF-8緙栫爜緙栫爜瀛楃涓詫紝瀵硅繖浜涘瓧絎︼細(xì)鈥?/span> <b> <span twffan="done">; , / ? : @ & = + $</span> </b> <span twffan="done">鈥濅笉鍋氱紪鐮併?/span> </p> <p> <span twffan="done">encodeURIComponent/decodeURIComponent錛?/span> <br /> <span twffan="done">浠TF-8緙栫爜緙栫爜鎵鏈夊瓧絎︿覆銆?/span> </p> <p> <span twffan="done">鍥犱負(fù)escape/unescape宸茬粡deprecated銆傚氨涓嶈瀹冧簡(jiǎn)錛宔ncodeURI鍜宔ncodeURIComponent涔嬪墠鐨勫尯鍒敤瀹炰緥璇存槑錛?/span> <br /> <br /> <span twffan="done">姣斿璇磋浣跨敤get鏂瑰紡灝嗕竴涓弬鏁皍錛屼紶閫掔粰鏈嶅姟鍣細(xì)</span> </p> <div style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: 1px solid; PADDING-LEFT: 5px; BACKGROUND: rgb(230,230,230) 0% 50%; PADDING-BOTTOM: 5px; BORDER-LEFT: 1px solid; WIDTH: 90%; PADDING-TOP: 5px; BORDER-BOTTOM: 1px solid; FONT-FAMILY: 'Courier New'; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" twffan="done"> <div twffan="done"> <b> <font color="#0000ff"> <span twffan="done">var</span> </font> </b> <span twffan="done">聽(tīng)u="index.php?blogId=1&op=Default";</span> <br /> <b> <font color="#0000ff"> <span twffan="done">var</span> </font> </b> <span twffan="done">聽(tīng)getURL="http://www.simplelife.cn/test.php?p="+encodeURI(u);</span> </div> </div> <br /> <span twffan="done">榪欓噷錛屽鏋滀嬌鐢ㄤ簡(jiǎn)encodeURI錛岄偅涔堟渶緇堢殑getURL鐨勫間負(fù)錛?/span> <br /> <div style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: 1px solid; PADDING-LEFT: 5px; BACKGROUND: rgb(230,230,230) 0% 50%; PADDING-BOTTOM: 5px; BORDER-LEFT: 1px solid; WIDTH: 90%; PADDING-TOP: 5px; BORDER-BOTTOM: 1px solid; FONT-FAMILY: 'Courier New'; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" twffan="done"> <div twffan="done"> <span twffan="done">http://www.simplelife.cn/test.php?p=index.php?blogId=1&op=Default</span> </div> </div> <br /> <span twffan="done">榪欐牱錛屽鍙傛暟u涓殑瀛楃"&op=Default"錛屽皢涓嶄細(xì)浣滀負(fù)瀛楃涓插弬鏁頒紶閫掑埌鏈嶅姟鍣ㄧ錛岃屾槸褰撲綔test.php鐨勫弬鏁頒紶閫掕繃鍘諱簡(jiǎn)錛屽洜涓哄"&op=Default"涓殑瀛楃"&"娌℃湁鍋氱紪鐮併?/span> <br /> <span twffan="done">鎵浠ワ紝鍦ㄨ繖縐嶅簲鐢?font class="intellitextLink" onmouseover="tixa_adDisplay('鍦烘櫙','H',this)" onmouseout="tixa_adHide(this)" color="#006400"><u>鍦烘櫙</u></font>涓嬶紝灝遍渶瑕佷嬌鐢╡ncodeURIComponent錛岀紪鐮佸悗鐨刧etURL鍊間負(fù)錛?/span> <br /> <div style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: 1px solid; PADDING-LEFT: 5px; BACKGROUND: rgb(230,230,230) 0% 50%; PADDING-BOTTOM: 5px; BORDER-LEFT: 1px solid; WIDTH: 90%; PADDING-TOP: 5px; BORDER-BOTTOM: 1px solid; FONT-FAMILY: 'Courier New'; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" twffan="done"> <div twffan="done"> <span twffan="done">http://www.simplelife.cn/test.php?p=index.php%3FblogId%3D1%26op%3DDefault</span> </div> </div> <br /> <span twffan="done">榪欐牱錛屽弬鏁板氨鍙互欏哄埄浼犻掕繃鍘諱簡(jiǎn)銆傚湪鏈嶅姟鍣ㄧ寰楀埌鐨勫瓧絎︿覆灝嗘槸姝g‘鐨剈銆?/span> <br /> <br /> <span twffan="done">鍙嶄箣錛屽鏋滈渶瑕侀氳繃get鏂瑰紡璁塊棶鏌愪竴URL錛屼絾鏄疷RL涓寘鍚腑鏂囩瓑瀛楃錛屼負(fù)浜?jiǎn)闃叉湄曠爜绛壘~栫爜闂錛岄渶瑕佸皢URL閫氳繃encodeURI榪涜緙栫爜銆?/span> <img src ="http://m.tkk7.com/juhongtao/aggbug/78936.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/juhongtao/" target="_blank">javaGrowing</a> 2006-11-03 15:49 <a href="http://m.tkk7.com/juhongtao/archive/2006/11/03/78936.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://lianghao999.com" target="_blank">亚洲视频在线一区二区三区</a>| <a href="http://tvnxl.com" target="_blank">男男gvh肉在线观看免费</a>| <a href="http://616kb.com" target="_blank">24小时免费直播在线观看</a>| <a href="http://xyjxnhcl.com" target="_blank">国产精品亚洲专区无码WEB</a>| <a href="http://henhenluc.com" target="_blank">国产精品亚洲二区在线观看</a>| <a href="http://ccccccx.com" target="_blank">色欲国产麻豆一精品一AV一免费</a>| <a href="http://gdfcjzx.com" target="_blank">国产99在线|亚洲</a>| <a href="http://www398ph.com" target="_blank">国产亚洲精品激情都市</a>| <a href="http://863409.com" target="_blank">免费一本色道久久一区</a>| <a href="http://djqq520.com" target="_blank">一区二区在线免费视频</a>| <a href="http://cjsyw123.com" target="_blank">亚洲字幕在线观看</a>| <a href="http://sy8989.com" target="_blank">亚洲性日韩精品国产一区二区</a>| <a href="http://rseav.com" target="_blank">2019中文字幕在线电影免费</a>| <a href="http://tccqdy.com" target="_blank">免费播放美女一级毛片</a>| <a href="http://56aaaa.com" target="_blank">亚洲精品视频在线观看免费</a>| <a href="http://8xxon8.com" target="_blank">免费a在线观看播放</a>| <a href="http://kfdingrui.com" target="_blank">成人免费黄色网址</a>| <a href="http://3333kkkk.com" target="_blank">jizz免费在线观看</a>| <a href="http://otkaxap.com" target="_blank">国产精品亚洲综合久久 </a>| <a href="http://m0808dy.com" target="_blank">亚洲AV日韩AV永久无码下载</a>| <a href="http://yisaoma.com" target="_blank">无码视频免费一区二三区</a>| <a href="http://56ms.com" target="_blank">国产免费AV片在线观看</a>| <a href="http://ai-xian.com" target="_blank">精品国产亚洲一区二区三区在线观看</a>| <a href="http://470577.com" target="_blank">亚洲av无码一区二区乱子伦as</a>| <a href="http://828556.com" target="_blank">国产精品免费_区二区三区观看 </a>| <a href="http://zjtuntex.com" target="_blank">一个人看的www免费高清</a>| <a href="http://www09191z.com" target="_blank">亚洲w码欧洲s码免费</a>| <a href="http://144446.com" target="_blank">久久国产亚洲电影天堂</a>| <a href="http://ac839.com" target="_blank">伊在人亚洲香蕉精品区麻豆</a>| <a href="http://www676617.com" target="_blank">一色屋成人免费精品网站</a>| <a href="http://ee45987.com" target="_blank">A片在线免费观看</a>| <a href="http://zmnhssn.com" target="_blank">美女啪啪网站又黄又免费</a>| <a href="http://xzdlgp.com" target="_blank">国产免费阿v精品视频网址</a>| <a href="http://fz166.com" target="_blank">国产a v无码专区亚洲av</a>| <a href="http://oakuu.com" target="_blank">国产精品无码免费播放</a>| <a href="http://kt4444.com" target="_blank">黄页免费在线观看</a>| <a href="http://blcvs.com" target="_blank">人妻免费久久久久久久了</a>| <a href="http://gxnnzk.com" target="_blank">亚洲成a人无码亚洲成www牛牛</a>| <a href="http://haha02.com" target="_blank">亚洲视频小说图片</a>| <a href="http://wulegu.com" target="_blank">亚洲高清在线视频</a>| <a href="http://srztw.com" target="_blank">最新亚洲成av人免费看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>