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

聽Rec(0).AppendChunk(strBody);

聽Rec.Update();
聽var HTML=Rec(0).Value;
聽Rec.Close();
聽delete Rec;
聽document.charset=cset;
聽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)
{
聽// 閿欒瀛楃涓?br />聽this.ErrorStr 聽聽= null;
聽// 閿欒浜嬩歡椹卞姩,褰撳彂鐢熼敊璇椂瑙﹀彂
聽this.OnError 聽聽= OnError;
聽// 鐘舵佷簨浠墮┍鍔?褰撶姸鎬佹敼鍙樻椂瑙﹀彂
聽this.OnState 聽聽= OnState;
聽// 瀹屾垚浜嬩歡椹卞姩,褰撶被鎿嶄綔瀹屾垚鏃惰Е鍙?br />聽this.OnDownloadEnd 聽= OnDownloadEnd;

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

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

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

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

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

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

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

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

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

聽}

}

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

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


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

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

聽聽 聽聽case 1:
聽聽strState = "寮濮嬭鍙栨暟鎹?..";
聽聽break;

聽聽 聽聽case 2:
聽聽strState = "璇誨彇鏁版嵁...";
聽聽break;

聽聽 聽聽case 3:
聽聽strState = "璇誨彇鏁版嵁涓?..";
聽聽break;

聽聽 聽聽case 4:
聽聽strState = "璇誨彇瀹屾垚...";
聽聽break;

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

// 瀹屾垚鍥炶皟浜嬩歡鍑芥暟
function EventDownloadEnd(strValue)
{
聽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>聽



]]>
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>
<%

Server.ScriptTimeout=9999999;
function send_request(url) {
聽var codedtext;
聽http_request = Server.CreateObject("Microsoft.XMLHTTP");
聽http_request.Open("GET",url,false);
聽http_request.Send(null);
聽if (http_request.ReadyState == 4){
聽聽//鑷姩鍒ゆ柇緙栫爜寮濮?br />聽聽var charresult = http_request.ResponseText.match(/CharSet=(\S+)\">/i);
聽聽if (charresult != null){
聽聽var Cset = charresult[1];
聽聽}else{Cset = "gb2312"}//瀵硅幏鍙栦笉鍒扮殑緗戠珯閲囩敤gb2312緙栫爜,鍙嚜琛屾洿鏀?br />聽聽
//鑷姩鍒ゆ柇緙栫爜緇撴潫
聽聽codedtext = bytesToBSTR(http_request.Responsebody,Cset);
聽聽}else{
聽聽codedtext = "Erro";
聽聽}
聽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 />聽聽 String.prototype.trim = function()<br />聽聽 {<br />聽聽聽聽return this.replace(/(^[\s]*)|([\s]*$)/g, "");<br />聽聽 };<br />聽聽 //鍒犻櫎瀛楃涓插乏杈圭┖鏍?br />聽聽 String.prototype.lTrim = function()<br />聽聽 {<br />聽聽聽聽return this.replace(/(^[\s]*)/g, "");<br />聽聽 };<br />聽聽 //鍒犻櫎瀛楃涓插彸杈圭┖鏍?br />聽聽 String.prototype.rTrim = function()<br />聽聽 {<br />聽聽聽聽return this.replace(/([\s]*$)/g, "");<br />聽聽 };</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 ||聽聽""== str.trim()) {<br />聽聽return true;<br /> } else {<br />聽聽return false;<br /> }<br />};<br />//鏍¢獙鏄惁鍏ㄦ槸鏁板瓧<br />ChkUtil.isDigit聽聽= 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 />聽聽var patrn=/^([+]?)\d*\.\d+$/;<br />聽聽return patrn.test(str);<br />};<br />//鏍¢獙鏄惁涓鴻礋嫻偣鏁?br />ChkUtil.isMinusFloat=function(str){<br />聽聽var patrn=/^-\d*\.\d+$/;<br />聽聽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 />聽聽if(!/\d{4}(\.|\/|\-)\d{1,2}(\.|\/|\-)\d{1,2}/.test(str)){<br />聽聽聽聽return false;<br />聽聽}<br />聽聽var r = str.match(/\d{1,4}/g);<br />聽聽if(r==null){return false;};<br />聽聽var d= new Date(r[0], r[1]-1, r[2]);<br />聽聽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 />聽聽<script type='text/javascript' src='./common.js'></script><br />聽聽<script type='text/javascript' src='./chkUtil.js'></script><br />聽聽<script type='text/javascript'><br />聽聽 function $F(id){<br />聽聽聽聽聽聽if(ChkUtil.isNull(id)){alert("鍑芥暟$F()鐨勫弬鏁頒笉鑳戒負(fù)絀?);return false;}<br />聽聽聽聽聽聽return document.getElementById(id).value;<br />聽聽 }<br />聽聽 function test(){<br />聽聽聽聽var area=$F("area");<br />聽聽聽聽if(area==false)return;<br />聽聽聽聽alert(ChkUtil.isDate(area));//鍒ゆ柇鏄惁鏄悎娉曟棩鏈?br />聽聽 }</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="1611166" class="thread_time">聽聽聽聽</div> <span id="6616111" 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;
聽 聽try {
聽 聽 聽var xls 聽 聽= new ActiveXObject ( "Excel.Application" );
聽 聽 }
聽 聽catch(e) {
聽 聽 聽 聽 alert( "瑕佹墦鍗拌琛紝鎮(zhèn)ㄥ繀欏誨畨瑁匛xcel鐢?shù)瀛愯〃鏍艰蒋錃g錛屽悓鏃舵祻瑙堝櫒欏諱嬌鐢ㄢ淎ctiveX 鎺т歡鈥濓紝鎮(zhèn)ㄧ殑嫻忚鍣ㄩ』鍏佽鎵ц鎺т歡銆?璇風(fēng)偣鍑匯愬府鍔┿戜簡(jiǎn)瑙f祻瑙堝櫒璁劇疆鏂規(guī)硶錛?);
聽 聽 聽 聽 聽 聽 聽return "";
聽 聽 }

聽 聽xls.visible =true; 聽//璁劇疆excel涓哄彲瑙?

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

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

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

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

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

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

window.close();聽
</ script >

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

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


var 聽arg聽 = 聽window.showModalDialog('ChooseEstate.htm' + para,window,'dialogWidth:' + width + 'px;dialogHeight:' + height + 'px;help: 0 ;');聽
window.opener聽
= 聽window;聽鎴杦indow.opener=null;
window.close();聽
</ 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">聽u="index.php?blogId=1&op=Default";</span> <br /> <b> <font color="#0000ff"> <span twffan="done">var</span> </font> </b> <span twffan="done">聽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://cztshw.com" target="_blank">毛片无码免费无码播放</a>| <a href="http://kj555888.com" target="_blank">亚洲AV成人无码网天堂</a>| <a href="http://sk7758.com" target="_blank">久久久影院亚洲精品</a>| <a href="http://jdv6.com" target="_blank">国产亚洲欧洲Aⅴ综合一区 </a>| <a href="http://www-yhty.com" target="_blank">青娱乐免费视频在线观看</a>| <a href="http://kencery.com" target="_blank">久久99青青精品免费观看</a>| <a href="http://df8848.com" target="_blank">日韩精品人妻系列无码专区免费 </a>| <a href="http://jiujiujingpin.com" target="_blank">jizz18免费视频</a>| <a href="http://yuezhaoming.com" target="_blank">日韩少妇内射免费播放</a>| <a href="http://www-533999.com" target="_blank">一级毛片免费播放试看60分钟</a>| <a href="http://catalna.com" target="_blank">特级毛片在线大全免费播放</a>| <a href="http://1314xxx.com" target="_blank">一区二区三区在线免费观看视频</a>| <a href="http://juguanghr.com" target="_blank">9久热精品免费观看视频</a>| <a href="http://www-6209.com" target="_blank">99在线免费观看</a>| <a href="http://szzrjk.com" target="_blank">日韩精品无码专区免费播放</a>| <a href="http://https357171.com" target="_blank">色片在线免费观看</a>| <a href="http://m8va.com" target="_blank">最近免费中文字幕视频高清在线看</a>| <a href="http://kkjk123.com" target="_blank">好爽…又高潮了毛片免费看</a>| <a href="http://01shanzhai.com" target="_blank">小小影视日本动漫观看免费</a>| <a href="http://15831883389.com" target="_blank">内射无码专区久久亚洲</a>| <a href="http://kt4444.com" target="_blank">亚洲色中文字幕无码AV</a>| <a href="http://ww11axax.com" target="_blank">亚洲免费视频在线观看</a>| <a href="http://www04ggg.com" target="_blank">亚洲一级高清在线中文字幕</a>| <a href="http://100357.com" target="_blank">亚洲成在人线aⅴ免费毛片</a>| <a href="http://gkhnf.com" target="_blank">日韩精品无码免费视频</a>| <a href="http://xa69.com" target="_blank">APP在线免费观看视频</a>| <a href="http://6266tv.com" target="_blank">最近免费中文字幕mv电影</a>| <a href="http://33sse.com" target="_blank">午夜精品在线免费观看</a>| <a href="http://yutuzb.com" target="_blank">亚洲一区二区三区免费</a>| <a href="http://xiaojiejieav.com" target="_blank">亚洲av之男人的天堂网站</a>| <a href="http://scienfood.com" target="_blank">亚洲av一本岛在线播放</a>| <a href="http://19520888.com" target="_blank">老司机免费午夜精品视频</a>| <a href="http://nmgqsyg.com" target="_blank">成全视频免费观看在线看</a>| <a href="http://www1688mz.com" target="_blank">美女视频黄的全免费视频网站</a>| <a href="http://726zh.com" target="_blank">国产色婷婷精品免费视频</a>| <a href="http://maomi02.com" target="_blank">亚洲乱码无码永久不卡在线</a>| <a href="http://ystchem.com" target="_blank">亚洲最大在线视频</a>| <a href="http://ccc321.com" target="_blank">美女免费视频一区二区三区</a>| <a href="http://dajiaody.com" target="_blank">免费一级毛片在线播放视频</a>| <a href="http://927ff.com" target="_blank">免费无码肉片在线观看</a>| <a href="http://zbr555sina.com" target="_blank">亚洲日韩在线观看</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>