Time of Update: 2018-07-17
轉自:http://www.cnblogs.com/haojianwei/archive/2010/03/02/1676707.html 一、Iframe 篇
Time of Update: 2018-07-17
聲明: 最近越來越感覺JS的優越性,項目中用到關於架構頁面重新整理的方法,在網上搜尋以後發現有許多不錯的代碼,但不是很齊全。於是,我索性從網路上搜集以後經過精心編排,整理了一下。^ - ^ 希望大家多多指教。先來看一個簡單的例子:下面以三個頁面分別命名為frame.html、top.html、bottom.html為例來具體說明如何做。 frame.html 由上(top.html)下(bottom.html)兩個頁面組成,
Time of Update: 2018-07-17
Do you want an ultra fast web site? Get JSL and optimize your JavaScript loading now! Imagine there's a 4-lane highway between your web browser and the internet itself. This highway is optimize to let pictures, text, and css fly
Time of Update: 2018-07-17
二十、Bookmarklet 1、什麼是Bookmarklet。(What's a Bookmarklet?) Q:什麼是Bookmarklet。 A:Bookmarklet是整個都被包含在超連結URL中的一小段JavaScript程式。(JavaScript URL就是這個樣子:<a href="javascript:the code goes here">。)多數瀏覽器允許使用者添加這些JavaScript
Time of Update: 2018-07-17
十二、滑鼠事件 5. Ctrl、Alt、Shift鍵(Ctrl, Alt, Shift Keys) Q:我如何檢測和按下Ctrl、Alt和Shift鍵一起的滑鼠事件。 A:在當今的瀏覽器中,指令碼可以檢測滑鼠事件發生時,使用者是否按下了Ctrl、Alt或者Shift鍵中任何一個。在下面的例子中,由MouseDown和MouseUp事件完成示範。而至於其它滑鼠事件,類似的方法可能達到效果,也可能達不到效果,這依賴於瀏覽器。
Time of Update: 2018-07-17
十三、顏色 1. 背景色(Background Color) Q:如何修改頁面背景色。 A:可以通過設定document.bgcolor屬性來改變背景色。例如,把背景色改為灰色: document.bgColor="#CCCCCC"; // set to gray 現在就試一下(譯者註:由於CSDN上代碼會被自動修改,所以省去了例子): 這裡選擇框由下列代碼建立:
Time of Update: 2018-07-17
十二、滑鼠事件 2. 左鍵 vs.右鍵(Left vs. Right Button) Q:我如何檢查使用者點擊的是右鍵還是左鍵。 A:click事件只在左鍵發生,因此onClick事件處理器不用進行左右鍵測試。 另一方面,mousedown和mouseup事件可能發生在滑鼠的任何鍵上。要確定使用者點擊的是左鍵還是右鍵,可以使用下列事件屬性: Netscape Navigator中 event.which Internet
Time of Update: 2018-07-17
二十一、聲音 1、可以播放聲音的瀏覽器(Audio-enabled Browsers) Q:什麼可以瀏覽器可以執行播放聲音的指令碼。 A:如果在聲音播放描述的技術可以在Miscrosoft Internet Explorer 4.0及其更新版本中工作,那麼同樣可以在Netscape Navigator 3.0及其更新版本中工作。要在Internet Explorer中播放聲音,在4.0以及後來版本中測試就足夠了。然後在Netscape
Time of Update: 2018-07-17
六、視窗 1. 開啟一個視窗(Opening a window) Q:我如何開啟一個新的瀏覽器視窗。 A:可以使用window.open()方法,開啟一個新瀏覽器視窗。例如,下面的代碼就在一個新視窗中顯示當前頁。 myRef = window.open(''+self.location,'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
Time of Update: 2018-07-17
1, 首先,要讓你的ie允許調試指令碼。 具體步驟如下: 開啟ie->工具菜單->inter選項->進階選項卡->去掉“禁止指令碼調試"選項 2, 開啟vs.net,建立一個新的asp.net項目(或開啟一個) 3, 運行你要調試的頁面 4,當你的頁面呈現在ie裡的時候,重新回到vs.net 5,在指令碼中設定斷點:
Time of Update: 2018-07-17
十二、 滑鼠事件 1. 滑鼠事件屬性(Mouse Event Properties ) Q:哪些事件屬性我可以用來分析滑鼠事件。A:Netscape Navigator 4和Internet Explorer
Time of Update: 2018-07-17
一.<script>urlinfo=window.location.href; //擷取當前頁面的urllen=urlinfo.length;//擷取url的長度offset=urlinfo.indexOf("?");//設定參數字串開始的位置newsidinfo=urlinfo.substr(offset,len)//取出參數字串
Time of Update: 2018-07-16
標籤:regex tor cti css 思路 selector regexp length 密碼 ---恢複內容開始---HTML代碼 <input type="text" type=
Time of Update: 2018-07-16
標籤:格式 javascrip 字元 value led 日期 字串 script EDA // //擷取目前時間// var dt = new Date();//
Time of Update: 2018-07-16
標籤:-- value 寫法 test locale script 總結 min led //var dt=new Date();// var dt=+new
Time of Update: 2018-07-16
標籤:實現 nts script this for 尋找 mat cti arguments //尋找一組資料中的最大值var result = Math.max(10, 20, 39, 40)
Time of Update: 2018-07-16
標籤:重複執行 ted 性問題 asc 瀏覽曆史 page 最新 設定 false length history.length屬性儲存著記錄的URL數量。初始時,該值為1。由於IE10+瀏覽器
Time of Update: 2018-07-17
標籤:border nts style order 20px relative css random text 首先是HTML代碼<p id="text">您還剩餘3次機會</
Time of Update: 2018-07-15
標籤:函數 關鍵點 共用 運算 傳遞方式 cti 分布 參數 UNC 在《JavaScript進階程式設計》第三版
Time of Update: 2018-07-15
標籤:eth fun seconds javascrip function log minutes UNC 時間 格式化時間日期:function getDate(dt) {