Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><%--JavaScript學習--%> <script type="text/javascript" language="JavaScript"> function funArray() { /*
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML> <HEAD> <title>test01</title> <meta http-equiv="Content-Type" content="text/html;charset=gb2312"> <meta content="Microsoft Visual Studio
很久沒有看到這樣讓人唇齒留香的好文了。上次看到的是一篇是 Douglas Crockford 的JavaScript, We Hardly new Ya (我簡單翻譯了一下,譯文在後)。同其他教你如何用物件導向的思想編寫JavaScript的其他文章一樣,該文也是著重在這麼幾個要素:JavaScript的對象就是一個關聯陣列。 JavaScript 函數也是一個對象。 原型(Prototype) 閉包(Closures) 繼承/私人屬性/靜態方法 命名空間
<script type="text/javascript"> function getScroll() { var t, l, w, h; if (document.documentElement && document.documentElement.scrollTop) { t = document.documentElement.scrollTop; l = document.documentElement.
JavaScript中ActiveXObject對象是啟用並返回 Automation 對象的引用。使用方法: newObj = new ActiveXObject( servername.typename[, location]) servername是必選項。提供該對象的應用程式的名稱。typename是必選項。要建立的對象的類型或類。location是可選項。建立該對象的網路伺服器的名稱。 例:Code highlighting produced by Actipro
FireFox和IE中,如果給一個元素設定絕對位置,如果其父級元素都沒有設定成相對定位,那麼該絕對位置的元素應該相對於文檔根項目進行定位,在FF中這個元素是body,而在IE中,這個元素是html,為了統一,需要將body設定成相對定位。 CodeCode highlighting produced by Actipro CodeHighlighter