上午,朋友從國(guó)外給發(fā)了一個(gè)鏈接,告訴我這事一個(gè)很有意思的插件(http://plugins.jquery.com/project/crash)--可以直接讓IE6崩潰。對(duì)于前端開(kāi)發(fā)者來(lái)說(shuō),對(duì)于IE6可能大傷腦筋。打開(kāi)代碼源文件,只見(jiàn)到以下代碼:
/**
* jQuery Crash (http://mktgdept.com/jquery-crash)
* A jQuery plugin to crash IE6.
*
* v0.0.2 - 5 March 2010
*
* Copyright (c) 2009 Chad Smith (http://twitter.com/chadsmith)
* Dual licensed under the MIT and GPL licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/gpl-license.php
*
* Use $.crash();
*
**/
;jQuery.crash=function(x){for(x in document.open);};
看到代碼,我百思不得其解。它如何工作?通過(guò)搜索,在《jQuery one-line plugin to crash IE6》找到了一點(diǎn)答案--通過(guò)一段惡意的代碼使瀏覽器崩潰。但他如何工作,我還是一頭霧水。該文章有很多相關(guān)的評(píng)論,說(shuō)法不一。
上一篇 Google(谷歌)的價(jià)值觀值得每位站長(zhǎng)學(xué)習(xí)
下一篇 長(zhǎng)期使用中型Access數(shù)據(jù)庫(kù)的一點(diǎn)經(jīng)驗(yàn)與缺點(diǎn)