javascript收集貼
當(dāng)前位置:點(diǎn)晴教程→知識管理交流
→『 技術(shù)文檔交流 』
事件源對象
event.srcelement.tagname event.srcelement.type 捕獲釋放 event.srcelement.setcapture(); event.srcelement.releasecapture(); 事件按鍵 event.keycode event.shiftkey event.altkey event.ctrlkey 事件返回值 event.returnvalue 鼠標(biāo)位置 event.x event.y 窗體活動元素 document.activeelement 綁定事件 document.captureevents(event.keydown); 訪問窗體元素 document.all("txt").focus(); document.all("txt").select(); 窗體命令 document.execcommand 窗體cookie document.cookie 菜單事件 document.oncontextmenu 創(chuàng)建元素 document.createelement("span"); 根據(jù)鼠標(biāo)獲得元素: document.elementfrompoint(event.x,event.y).tagname=="td document.elementfrompoint(event.x,event.y).appendchild(ms) 窗體圖片 document.images[索引] 窗體事件綁定 document.onmousedown=scrollwindow; 元素 document.窗體.elements[索引] 對象綁定事件 document.all.xxx.detachevent('onclick',a); 插件數(shù)目 navigator.plugins 取變量類型 typeof($js_libpath) == "undefined" 下拉框 下拉框.options[索引] 下拉框.options.length 查找對象 document.getelementsbyname("r1"); document.getelementbyid(id); 定時 timer=setinterval('scrollwindow()',delay); clearinterval(timer); uncode編碼 escape() ,unescape 父對象 obj.parentelement(dhtml) obj.parentnode(dom) 交換表的行 tableid.moverow(2,1) 替換css document.all.csss.href = "a.css"; 并排顯示 display:inline 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 并排顯示 display:inline 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 替換css document.all.csss.href = "a.css"; 并排顯示 display:inline 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 并排顯示 display:inline 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 隱藏焦點(diǎn) hidefocus=true 根據(jù)寬度換行 style="word-break:break-all" 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 自動刷新 <meta http-equiv="refresh" content="8;url=http://c98.yeah.net"> 簡單郵件 <a href="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy"> 快速轉(zhuǎn)到位置 obj.scrollintoview(true) 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; 錨 <a name="first"> <a href="#first">anchors</a> 網(wǎng)頁傳遞參數(shù) location.search(); 可編輯 obj.contenteditable=true 執(zhí)行菜單命令 obj.execcommand 雙字節(jié)字符 /[^\x00-\xff]/ 漢字 /[\u4e00-\u9fa5]/ 讓英文字符串超出表格寬度自動換行 word-wrap: break-word; word-break: break-all; 透明背景 <iframe src="1.htm" width=300 height=180 allowtransparency></iframe> 獲得style內(nèi)容 obj.style.csstext html標(biāo)簽 document.documentelement.innerhtml 第一個style標(biāo)簽 document.stylesheets[0] style標(biāo)簽里的第一個樣式 document.stylesheets[0].rules[0] 防止點(diǎn)擊空鏈接時,頁面往往重置到頁首端。 <a href="javascript:function()">word</a> 上一網(wǎng)頁源 asp: request.servervariables("http_referer") javascript: document.referrer 釋放內(nèi)存 collectgarbage(); 禁止右鍵 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止選取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘貼 <input type=text onpaste="return false"> 地址欄圖標(biāo) <link rel="shortcut icon" href="favicon.ico"> favicon.ico 名字最好不變16*16的16色,放虛擬目錄根目錄下 收藏欄圖標(biāo) <link rel="bookmark" href="favicon.ico"> 查看源碼 <input type=button value=查看網(wǎng)頁源代碼 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'"> 關(guān)閉輸入法 <input style="ime-mode:disabled"> 自動全選 <input type=text name=text1 value="123" onfocus="this.select()"> enter鍵可以讓光標(biāo)移到下一個輸入框 <input onkeydown="if(event.keycode==13)event.keycode=9"> 文本框的默認(rèn)值 <input type=text value="123" onfocus="alert(this.defaultvalue)"> title換行 obj.title = "123
sdfs " 獲得時間所代表的微秒 var n1 = new date("2004-10-10".replace(/-/g, "\/")).gettime() 窗口是否關(guān)閉 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 獲取選中內(nèi)容 document.selection.createrange().duplicate().text 自動完成功能 <input type=text autocomplete=on>打開該功能 <input type=text autocomplete=off>關(guān)閉該功能 窗口最大化 <body onload="window.resizeto(window.screen.width - 4,window.screen.height-50);window.moveto(-4,-4)"> 無關(guān)閉按鈕ie window.open("aa.htm", "meizz", "fullscreen=7"); 統(tǒng)一編碼/解碼 alert(decodeuricomponent(encodeuricomponent("http://你好.com?as= hehe"))) encodeuricomponent對":"、"/"、";" 和 "?"也編碼 表格行指示 <tr onmouseover="this.bgcolor='#f0f0f0'" onmouseout="this.bgcolor='#ffffff'"> //各種尺寸
s += "\r\n網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientwidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientheight; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetweight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetheight +" (包括邊線的寬)"; s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollwidth; s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollheight; s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrolltop; s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollleft; s += "\r\n網(wǎng)頁正文部分上:"+ window.screentop; s += "\r\n網(wǎng)頁正文部分左:"+ window.screenleft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的寬:"+ window.screen.width; s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availheight; s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availwidth; //過濾數(shù)字 <input type=text onkeypress="return event.keycode>=48&&event.keycode<=57||(this.value.indexof('.')<0?event.keycode==46:false)" onpaste="return !clipboarddata.getdata('text').match(/\d/)" ondragenter="return false">
//特殊用途 <input type=button value=導(dǎo)入收藏夾 onclick="window.external.importexportfavorites(true,'');">
<input type=button value=導(dǎo)出收藏夾 onclick="window.external.importexportfavorites(false,'');"> <input type=button value=整理收藏夾 onclick="window.external.showbrowserui('organizefavorites', null)"> <input type=button value=語言設(shè)置 onclick="window.external.showbrowserui('languagedialog', null)"> <input type=button value=加入收藏夾 onclick="window.external.addfavorite('http://www.google.com/', 'google')"> <input type=button value=加入到頻道 onclick="window.external.addchannel('http://www.google.com/')"> <input type=button value=加入到頻道 onclick="window.external.showbrowserui('privacysettings',null)"> //不緩存 <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> <meta http-equiv="expires" content="0"> //正則匹配 匹配中文字符的正則表達(dá)式: [\u4e00-\u9fa5] 匹配雙字節(jié)字符(包括漢字在內(nèi)):[^\x00-\xff] 匹配空行的正則表達(dá)式:\n[\s| ]*\r 匹配html標(biāo)記的正則表達(dá)式:/<(.*)>.*<\/\1>|<(.*) \/>/ 匹配首尾空格的正則表達(dá)式:(^\s*)|(\s*$)(像vbscript那樣的trim函數(shù)) 匹配email地址的正則表達(dá)式:\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* 匹配網(wǎng)址url的正則表達(dá)式:http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)? 以下是例子: 利用正則表達(dá)式限制網(wǎng)頁表單里的文本框輸入內(nèi)容: 用正則表達(dá)式限制只能輸入中文:onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')" onbeforepaste="clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\u4e00-\u9fa5]/g,''))" 1.用正則表達(dá)式限制只能輸入全角字符: onkeyup="value=value.replace(/[^\uff00-\uffff]/g,'')" onbeforepaste="clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\uff00-\uffff]/g,''))" 2.用正則表達(dá)式限制只能輸入數(shù)字:onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\d]/g,''))" 3.用正則表達(dá)式限制只能輸入數(shù)字和英文:onkeyup="value=value.replace(/[\w]/g,'') "onbeforepaste="clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\d]/g,''))" //消除圖像工具欄 <img src="mypicture.jpg" height="100px" width="100px" galleryimg="false">
or <head> <meta http-equiv="imagetoolbar" content="no"> </head> <img src="mypicture.jpg" height="100px" width="100px" galleryimg="false">
or <head> <meta http-equiv="imagetoolbar" content="no"> </head> //無提示關(guān)閉 function close() { var ua=navigator.useragent var ie=navigator.appname=="microsoft internet explorer"?true:false if(ie) { var ieversion=parsefloat(ua.substring(ua.indexof("msie ")+5,ua.indexof(";",ua.indexof("msie ")))) if(ieversion< 5.5) { var str = '<object id=notipclose classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">' str += '<param name="command" value="close"></object>'; document.body.insertadjacenthtml("beforeend", str); document.all.notipclose.click(); } else { window.opener =null; window.close(); } } else { window.close() } } //取得控件得絕對位置(1) <script language="javascript"> function getoffset(e) { var t=e.offsettop; var l=e.offsetleft; while(e=e.offsetparent) { t+=e.offsettop; l+=e.offsetleft; } var rec = new array(1); rec[0] = t; rec[1] = l; return rec } </script> //獲得控件的絕對位置(2) orect = obj.getboundingclientrect();
orect.left orect. //最小化,最大化,關(guān)閉 <object id=min classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="minimize"></object> <object id=max classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="command" value="maximize"></object> <object id=close classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="command" value="close"></object> <input type=button value=最小化 onclick=min.click()> <input type=button value=最大化 onclick=max.click()> <input type=button value=關(guān)閉 onclick=close.click()> //光標(biāo)停在文字最后
<script language="javascript"> function cc() { var e = event.srcelement; var r =e.createtextrange(); r.movestart('character',e.value.length); r.collapse(true); r.select(); } </script> <input type=text name=text1 value="123" onfocus="cc()"> //頁面進(jìn)入和退出的特效 進(jìn)入頁面<meta http-equiv="page-enter" content="revealtrans(duration=x, transition=y)"> 推出頁面<meta http-equiv="page-exit" content="revealtrans(duration=x, transition=y)"> 這個是頁面被載入和調(diào)出時的一些特效。duration表示特效的持續(xù)時間,以秒為單位。transition表示使 用哪種特效,取值為1-23: 0 矩形縮小 1 矩形擴(kuò)大 2 圓形縮小 3 圓形擴(kuò)大 4 下到上刷新 5 上到下刷新 6 左到右刷新 7 右到左刷新 8 豎百葉窗 9 橫百葉窗 10 錯位橫百葉窗 11 錯位豎百葉窗 12 點(diǎn)擴(kuò)散 13 左右到中間刷新 14 中間到左右刷新 15 中間到上下 16 上下到中間 17 右下到左上 18 右上到左下 19 左上到右下 20 左下到右上 21 橫條 22 豎條 23 //網(wǎng)頁是否被檢索 <meta name="robots" content="屬性值">
其中屬性值有以下一些: 屬性值為"all": 文件將被檢索,且頁上鏈接可被查詢; 屬性值為"none": 文件不被檢索,而且不查詢頁上的鏈接; 屬性值為"index": 文件將被檢索; 屬性值為"follow": 查詢頁上的鏈接; 屬性值為"noindex": 文件不檢索,但可被查詢鏈接; 屬性值為"nofollow": //打印分頁
<p style="page-break-after:always">page1</p>
<p style="page-break-after:always">page2</p> //設(shè)置打印
<object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="></object> <input type=button value=頁面設(shè)置 onclick="factory.printing.pagesetup()"> <input type=button value=打印預(yù)覽 onclick="factory.printing.preview()"> <script language=javascript> function window.onload() { // -- advanced features factory.printing.setmarginmeasure(2) // measure margins in inches factory.printing.setpagerange(false, 1, 3) // need pages from 1 to 3 factory.printing.printer = "hp deskjet 870c" factory.printing.copies = 2 factory.printing.collate = true factory.printing.papersize = "a4" factory.printing.papersource = "manual feed" // -- basic features factory.printing.header = "居左顯示&b居中顯示&b居右顯示頁碼,第&p頁/共&p頁" factory.printing.footer = "(自定義頁腳)" factory.printing.portrait = false factory.printing.leftmargin = 0.75 factory.printing.topmargin = 1.5 factory.printing.rightmargin = 0.75 factory.printing.bottommargin = 1.5 } function print(frame) { factory.printing.print(true, frame) // print with prompt } </script> <input type=button value="打印本頁" onclick="factory.printing.print(false)"> <input type=button value="頁面設(shè)置" onclick="factory.printing.pagesetup()"> <input type=button value="打印預(yù)覽" onclick="factory.printing.preview()"><br> <a href=" //自帶的打印預(yù)覽 webbrowser.execwb(1,1) 打開
web.execwb(2,1) 關(guān)閉現(xiàn)在所有的ie窗口,并打開一個新窗口 web.execwb(4,1) 保存網(wǎng)頁 web.execwb(6,1) 打印 web.execwb(7,1) 打印預(yù)覽 web.execwb(8,1) 打印頁面設(shè)置 web.execwb(10,1) 查看頁面屬性 web.execwb(15,1) 好像是撤銷,有待確認(rèn) web.execwb(17,1) 全選 web.execwb(22,1) 刷新 web.execwb(45,1) 關(guān)閉窗體無提示 <style media=print> .noprint{display:none;}<!--用本樣式在打印時隱藏非打印項目--> .pagenext{page-break-after: always;}<!--控制分頁--> </style> <object id="webbrowser" width=0 height=0 classid="clsid:8856f961-340a-11d0-a96b-00c04fd705a2"> </object> <center class="noprint" > <input type=button value=打印 onclick=document.all.webbrowser.execwb(6,1)> <input type=button value=直接打印 onclick=document.all.webbrowser.execwb(6,6)> <input type=button value=頁面設(shè)置 onclick=document.all.webbrowser.execwb(8,1)> </p> <p> <input type=button value=打印預(yù)覽 onclick=document.all.webbrowser.execwb(7,1)> </center> //去掉打印時的頁眉頁腳 <script language="javascript"> var hkey_root,hkey_path,hkey_key; hkey_root="hkey_current_user"; hkey_path="\\software\\microsoft\\internet explorer\\pagesetup\\"; //設(shè)置網(wǎng)頁打印的頁眉頁腳為空 function pagesetup_null() { try { var wsh=new activexobject("wscript.shell"); hkey_key="header"; wsh.regwrite(hkey_root+hkey_path+hkey_key,""); hkey_key="footer"; wsh.regwrite(hkey_root+hkey_path+hkey_key,""); } catch(e){} } //設(shè)置網(wǎng)頁打印的頁眉頁腳為默認(rèn)值 function pagesetup_default() { try { var wsh=new activexobject("wscript.shell"); hkey_key="header"; wsh.regwrite(hkey_root+hkey_path+hkey_key,"&w&b頁碼,&p/&p"); hkey_key="footer"; wsh.regwrite(hkey_root+hkey_path+hkey_key,"&u&b&d"); } catch(e){} } </script> <input type="button" value="清空頁碼" onclick=pagesetup_null()> <input type="button" value="恢復(fù)頁碼" onclick=pagesetup_default()> //瀏覽器驗證 function checkbrowser() { this.ver=navigator.appversion this.dom=document.getelementbyid?1:0 this.ie6=(this.ver.indexof("msie 6")>-1 && this.dom)?1:0; this.ie5=(this.ver.indexof("msie 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseint(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.mac=(this.ver.indexof('mac') > -1) ?1:0; this.ope=(navigator.useragent.indexof('opera')>-1); this.ie=(this.ie6 || this.ie5 || this.ie4) this.ns=(this.ns4 || this.ns5) this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope) this.nbw=(!this.bw) return this; } //計算內(nèi)容寬和高 <script language="javascript">
function test(obj) { var range = obj.createtextrange(); alert("內(nèi)容區(qū)寬度: " + range.boundingwidth + "px\r\n內(nèi)容區(qū)高度: " + range.boundingheight + "px"); } </script> <body> <textarea id="txt" height="150">sdf</textarea><input type="button" value="計算內(nèi)容寬度" onclick="test(txt)"> </body> //無模式的提示框 function modelessalert(msg)
{ window.showmodelessdialog("javascript:alert(\""+escape(msg)+"\");window.close();","","status:no;resizable:no;help:no;dialogheight:height:30px;dialogheight:40px;"); } function modelessalert(msg)
{ window.showmodelessdialog("javascript:alert(\""+escape(msg)+"\");window.close();","","status:no;resizable:no;help:no;dialogheight:height:30px;dialogheight:40px;"); } <script language="javascript">
function test(obj) { var range = obj.createtextrange(); alert("內(nèi)容區(qū)寬度: " + range.boundingwidth + "px\r\n內(nèi)容區(qū)高度: " + range.boundingheight + "px"); } </script> <body> <textarea id="txt" height="150">sdf</textarea><input type="button" value="計算內(nèi)容寬度" onclick="test(txt)"> </body> //無模式的提示框 function modelessalert(msg)
{ window.showmodelessdialog("javascript:alert(\""+escape(msg)+"\");window.close();","","status:no;resizable:no;help:no;dialogheight:height:30px;dialogheight:40px;"); } function modelessalert(msg)
{ window.showmodelessdialog("javascript:alert(\""+escape(msg)+"\");window.close();","","status:no;resizable:no;help:no;dialogheight:height:30px;dialogheight:40px;"); } //屏蔽按鍵 <html>
<head> <meta http-equiv="content-type" content="text/html; charset=gb2312"> <noscript><meta http-equiv="refresh" content="0;url=about:noscript"></noscript> <title>屏蔽鼠標(biāo)右鍵、ctrl+n、shift+f10、alt+f4、f11、f5刷新、退格鍵</title> </head> <body> <script language="javascript"><!-- //屏蔽鼠標(biāo)右鍵、ctrl+n、shift+f10、f11、f5刷新、退格鍵 //author: meizz(梅花雨) 2002-6-18 function document.oncontextmenu(){event.returnvalue=false;}//屏蔽鼠標(biāo)右鍵 function window.onhelp(){return false} //屏蔽f1幫助 function document.onkeydown() { if ((window.event.altkey)&& ((window.event.keycode==37)|| //屏蔽 alt+ 方向鍵 ← (window.event.keycode==39))) //屏蔽 alt+ 方向鍵 → { alert("不準(zhǔn)你使用alt+方向鍵前進(jìn)或后退網(wǎng)頁!"); event.returnvalue=false; } /* 注:這還不是真正地屏蔽 alt+ 方向鍵, 因為 alt+ 方向鍵彈出警告框時,按住 alt 鍵不放, 用鼠標(biāo)點(diǎn)掉警告框,這種屏蔽方法就失效了。以后若 有哪位高手有真正屏蔽 alt 鍵的方法,請告知。*/ if ((event.keycode==8) || //屏蔽退格刪除鍵 (event.keycode==116)|| //屏蔽 f5 刷新鍵 (event.ctrlkey && event.keycode==82)){ //ctrl + r event.keycode=0; event.returnvalue=false; } if (event.keycode==122){event.keycode=0;event.returnvalue=false;} //屏蔽f11 if (event.ctrlkey && event.keycode==78) event.returnvalue=false; //屏蔽 ctrl+n if (event.shiftkey && event.keycode==121)event.returnvalue=false; //屏蔽 shift+f10 if (window.event.srcelement.tagname == "a" && window.event.shiftkey) window.event.returnvalue = false; //屏蔽 shift 加鼠標(biāo)左鍵新開一網(wǎng)頁 if ((window.event.altkey)&&(window.event.keycode==115)) //屏蔽alt+f4 { window.showmodelessdialog("about:blank","","dialogwidth:1px;dialogheight:1px"); return false; } } </script> 屏蔽鼠標(biāo)右鍵、ctrl+n、shift+f10、alt+f4、f11、f5刷新、退格鍵 </body> </html> //屏蔽打印 <style> @media print{ * {display:none} } </style> //移動的圖層,拖動
1.<span style='position:absolute;width:200;height:200;background:red' onmousedown=mousedown(this) onmousemove=mousemove() onmouseup=mouseup()>meizz</span> <script language=javascript> var obj; function mousedown(obj) { obj=obj; obj.setcapture(); obj.l=event.x-obj.style.pixelleft; obj.t=event.y-obj.style.pixeltop; } function mousemove() { if(obj!=null) { obj.style.left = event.x-obj.l; obj.style.top = event.y-obj.t; } } function mouseup() { if(obj!=null) { obj.releasecapture(); obj=null; } } </script> 2. <div id="mydiv" src="logo.gif" ondrag="dodrag();" onmouseover="this.style.cursor='hand'" style="position:absolute;left=100;top=100;" onmousedown="domousedown();"> <a href="#" onclick="return false"><h1>wlecome</h1></a> </div> <script language="javascript" type="text/javascript"> var orgmousex; var orgmousey; var orgobjx; var orgobjy; function dodrag() { var myobject=document.all.mydiv; var x=event.clientx;
var y=event.clienty; myobject.style.left=x-(orgmousex-orgobjx); myobject.style.top=y-(orgmousey-orgobjy); } function domousedown() { orgmousex=event.clientx; orgmousey=event.clienty; orgobjx=parseint(document.all.mydiv.style.left); orgobjy=parseint(document.all.mydiv.style.top); } </script>
//文檔狀態(tài)改變 <iframe src="a.html" id="f" name="f" scrolling="no" frameborder=0 marginwidth=0 marginheight=0></iframe> <script> var doc=window.frames["f"].document; function s(){ if (doc.readystate=="complete"){ document.all.f.style.height=doc.body.scrollheight document.all.f.style.width=doc.body.scrollwidth } } doc.onreadystatechange=s </script> //刷新后不變的文本框
<html>
<head> <meta name="save" content="history"> <style> .shistory {behavior:url(#default#savehistory);} </style> </head> <body> <input class=shistory type=text id=opersistinput> </body> </html> //訪問剪貼板 (1)拖拽訪問
event.datatransfer.setdata("url", oimage.src); simageurl = event.datatransfer.getdata("url") (2)普通訪問 window.clipboarddata.setdata("text",osource.innertext); window.clipboarddata.getdata("text"); //操作cookie function setcookie(sname, svalue) { document.cookie = sname + "=" + escape(svalue) + "; "; } function getcookie(sname) { var acookie = document.cookie.split("; "); for (var i=0; i < acookie.length; i++) { var acrumb = acookie[i].split("="); if (sname == acrumb[0]) return unescape(acrumb[1]); } } function delcookie(sname) { document.cookie = sname + "=" + escape(svalue) + "; expires=fri, 31 dec 1999 23:59:59 gmt;"; } //settimeout增加參數(shù) <script>
var _st = window.settimeout; window.settimeout = function(fref, mdelay) { if(typeof fref == 'function'){ var argu = array.prototype.slice.call(arguments,2); var f = (function(){ fref.apply(null, argu); }); return _st(f, mdelay); } return _st(fref,mdelay); } function test(x){ alert(x); } window.settimeout(test,1000,'fason'); </script> //自定義的apply,call
function.prototype.apply = function (obj, argu) {
if (obj) obj.constructor.prototype._caller = this; var argus = new array(); for (var i=0;i<argu.length;i++) argus[i] = "argu[" + i + "]"; var r; eval("r = " + (obj ? ("obj._caller(" + argus.join(",") + ");") : ("this(" + argus.join(",") + ");"))); return r; }; function.prototype.call = function (obj) { var argu = new array(); for (var i=1;i<arguments.length;i++) argu[i-1] = arguments[i]; return this.apply(obj, argu); }; //下載文件
function downurl(strremoteurl,strlocalurl)
{ try { var xmlhttp=new activexobject("microsoft.xmlhttp"); xmlhttp.open("get",strremoteurl,false); xmlhttp.send(); var adodbstream=new activexobject("adodb.stream"); adodbstream.type=1;//1=adtypebinary adodbstream.open(); adodbstream.write(xmlhttp.responsebody); adodbstream.savetofile(strlocalurl,2); adodbstream.close(); adodbstream=null; xmlhttp=null; } catch(e) { window.confirm("下載url出錯!"); } //window.confirm("下載完成."); } //檢驗連接是否有效
function getxml(url)
{ var xmlhttp = new activexobject("microsoft.xmlhttp"); xmlhttp.open("get",url, false); try { xmlhttp.send(); } catch(e){} finally { var result = xmlhttp.responsetext; if(result) { if(xmlhttp.status==200) { return(true); } else { return(false); } } else { return(false); } } } //post代替form <script language="vbscript">
function urlencoding(vstrin) strreturn = "" for i = 1 to len(vstrin) thischr = mid(vstrin,i,1) if abs(asc(thischr)) < &hff then strreturn = strreturn & thischr else innercode = asc(thischr) if innercode < 0 then innercode = innercode + &h10000 end if hight8 = (innercode and &hff00)\ &hff low8 = innercode and &hff strreturn = strreturn & "%" & hex(hight8) & "%" & hex(low8) end if next urlencoding = strreturn end function function bytes2bstr(vin) strreturn = "" for i = 1 to lenb(vin) thischarcode = ascb(midb(vin,i,1)) if thischarcode < &h80 then strreturn = strreturn & chr(thischarcode) else nextcharcode = ascb(midb(vin,i+1,1)) strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode)) i = i + 1 end if next bytes2bstr = strreturn end function dim stra,oreq stra = urlencoding("submit1=submit&text1=中文") set oreq = createobject("msxml2.xmlhttp") oreq.open "post","http://servername/vdir/tstresult.asp",false oreq.setrequestheader "content-length",len(stra) oreq.setrequestheader "content-type","application/x-www-form-urlencoded" oreq.send stra msgbox bytes2bstr(oreq.responsebody) </script> //readystate是xmlhttp返回數(shù)據(jù)的進(jìn)度,0=載入中,1=未初始化,2=已載入,3=運(yùn)行中,4=完成 //組件是否安裝
iscomponentinstalled("{6b053a4b-a7ec-4d3d-4567-b8ff8a1a5739}", "componentid")) //檢查網(wǎng)頁是否存在
function checkurl(url) { var xmlhttp = new activexobject("microsoft.xmlhttp"); xmlhttp.open("get",url, false); try { xmlhttp.send(); var result = xmlhttp.status; } catch(e) {return(false); } if(result==200) { return true; } xmlhttp = null; return false; } //連接數(shù)據(jù)庫 <script language="javascript"> //用 javascript 寫服務(wù)器端連接數(shù)據(jù)庫的代碼示例 var conn = new activexobject("adodb.connection"); conn.open("provider=sqloledb.1; data source=localhost; user id=sa; " +"password=; initial catalog=pubs"); var rs = new activexobject("adodb.recordset"); var sql="select * from authors"; rs.open(sql, conn); shtml = "<table width='100%' border=1>"; shtml +="<tr bgcolor='#f4f4f4'><td>au_id</td><td>au_lname</td><td>au_fname</td><td>phone</td><td>address</td><td> city</td><td>state</td><td>zip</td></tr>"; while(!rs.eof) { shtml += "<tr><td>" + rs("au_id") + "</td><td>" + rs("au_lname") + "</td><td>" + rs("au_fname") + "</td><td>" + rs("phone") + "</td><td>" + rs("address") + "</td><td>" + rs("city") + "</td><td>" + rs("state") + "</td><td>" + rs("zip") + "</td></tr>"; rs.movenext; } shtml += "</table>"; document.write(shtml); rs.close(); rs = null; conn.close(); conn = null; </script> //使用數(shù)據(jù)島 <html> <body> srno:<input type=text datasrc=#xmldate datafld=srno size="76"><br> times:<input type=text datasrc=#xmldate datafld=times size="76"><br> <input id="first" type=button value="<< 第一條記錄" onclick="xmldate.recordset.movefirst()"> <input id="prev" type=button value="<上一條記錄" onclick="xmldate.recordset.moveprevious()"> <input id="next" type=button value="下一條記錄>" onclick="xmldate.recordset.movenext()"> <input id="last" type=button value="最后一條記錄>>" onclick="xmldate.recordset.movelast()"> <input id="add" type=button value="添加新記錄" onclick="xmldate.recordset.addnew()"> <xml id="xmldate">
<infolist> <info ><srno>20041025-01</srno><times>null</times></info> <info ><srno>20041101-09</srno><times>2004年10月1日2點(diǎn)22分0秒</times></info> </infolist> </xml> </body> </html> //獲得參數(shù) <body>
<a href="javascript:location.href=location.href + '?a=1&b=2'">search</a> <script language="javascript"> <!-- var a = location.search.substr(1); if(a.length>0) { var re = /([^&]*?)\=([^&]*)/g var s = a.match(re); for(var i= 0;i<s.length;i++) { alert(s[i]); alert(s[i].split("=")[1]); } } //--> </script> </body> //可編輯select <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <body>
<a href="javascript:location.href=location.href + '?a=1&b=2'">search</a> <script language="javascript"> <!-- var a = location.search.substr(1); if(a.length>0) { var re = /([^&]*?)\=([^&]*)/g var s = a.match(re); for(var i= 0;i<s.length;i++) { alert(s[i]); alert(s[i].split("=")[1]); } } //--> </script> </body> //可編輯select <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <html>
<body> srno:<input type=text datasrc=#xmldate datafld=srno size="76"><br> times:<input type=text datasrc=#xmldate datafld=times size="76"><br> <input id="first" type=button value="<< 第一條記錄" onclick="xmldate.recordset.movefirst()"> <input id="prev" type=button value="<上一條記錄" onclick="xmldate.recordset.moveprevious()"> <input id="next" type=button value="下一條記錄>" onclick="xmldate.recordset.movenext()"> <input id="last" type=button value="最后一條記錄>>" onclick="xmldate.recordset.movelast()"> <input id="add" type=button value="添加新記錄" onclick="xmldate.recordset.addnew()"> <xml id="xmldate">
<infolist> <info ><srno>20041025-01</srno><times>null</times></info> <info ><srno>20041101-09</srno><times>2004年10月1日2點(diǎn)22分0秒</times></info> </infolist> </xml> </body> </html> //獲得參數(shù) <body>
<a href="javascript:location.href=location.href + '?a=1&b=2'">search</a> <script language="javascript"> <!-- var a = location.search.substr(1); if(a.length>0) { var re = /([^&]*?)\=([^&]*)/g var s = a.match(re); for(var i= 0;i<s.length;i++) { alert(s[i]); alert(s[i].split("=")[1]); } } //--> </script> </body> //可編輯select <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <body>
<a href="javascript:location.href=location.href + '?a=1&b=2'">search</a> <script language="javascript"> <!-- var a = location.search.substr(1); if(a.length>0) { var re = /([^&]*?)\=([^&]*)/g var s = a.match(re); for(var i= 0;i<s.length;i++) { alert(s[i]); alert(s[i].split("=")[1]); } } //--> </script> </body> //可編輯select <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> <input type=text name=re_name style="width:100px;height:21px;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#ffeeee;" onchange="document.all.re_name.value=this.value;">
<option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> //設(shè)置光標(biāo)位置 function getcaret(textbox) { var control = document.activeelement; textbox.focus(); var rang = document.selection.createrange(); rang.setendpoint("starttostart",textbox.createtextrange()) control.focus(); return rang.text.length; } function setcaret(textbox,pos) { try { var r =textbox.createtextrange(); r.movestart('character',pos); r.collapse(true); r.select(); } catch(e) {} } function selectlength(textbox,start,len) { try { var r =textbox.createtextrange(); r.moveend('character',len-(textbox.value.length-start)); r.movestart('character',start); r.select(); } catch(e) {//alert(e.description)} } function insertatcaret(textbox,text) { textbox.focus(); document.selection.createrange().text = text; } //頁內(nèi)查找
function findinpage(str) { var txt, i, found,n = 0; if (str == "") { return false; } txt = document.body.createtextrange(); for (i = 0; i <= n && (found = txt.findtext(str)) != false; i++) { txt.movestart("character", 1); txt.moveend("textedit"); } if (found) { txt.movestart("character", -1); txt.findtext(str); txt.select(); txt.scrollintoview(); n++; } else { if (n > 0) { n = 0; findinpage(str); } else { alert(str + "... 您要找的文字不存在。\n \n請試著輸入頁面中的關(guān)鍵字再次查找!"); } } return false; } //書 http://www.itpub.net/attachment.php?s=&postid=1894598
http://www.wrclub.net/down/listdown.aspx?id=1341 //操作execl <script language="javascript"> function jstartexcel() { var xls = new activexobject ( "excel.application" ); xls.visible = true; var newbook = xls.workbooks.add; newbook.worksheets.add; newbook.worksheets(1).activate; xls.activeworkbook.activesheet.pagesetup.orientation = 2; xls.activeworkbook.activesheet.pagesetup.papersize = 5; newbook.worksheets(1).columns("a").columnwidth=50; newbook.worksheets(1).columns("a").wraptext = true; newbook.worksheets(1).columns("b").columnwidth=50; newbook.worksheets(1).columns("b").wraptext = true; newbook.worksheets(1).range("a1:b1000").numberformat = "0"; newbook.worksheets(1).range("a1:b1000").horizontalalignment = -4131; newbook.worksheets(1).cells(1,1).interior.colorindex="15"; newbook.worksheets(1).cells(1,1).value="first column, first cell"; newbook.worksheets(1).cells(2,1).value="first column, second cell"; newbook.worksheets(1).cells(1,2).value="second column, first cell"; newbook.worksheets(1).cells(2,2).value="second column, second cell"; newbook.worksheets(1).name="my first worksheet"; } </script> //自定義提示條
<a href="#" title="這是提示">tip</a> <script language="javascript"> //***********默認(rèn)設(shè)置定義.********************* tpopwait=50;//停留twait豪秒后顯示提示。 tpopshow=5000;//顯示tshow豪秒后關(guān)閉提示 showpopstep=20; popopacity=99; //***************內(nèi)部變量定義***************** spop=null; curshow=null; tfadeout=null; tfadein=null; tfadewaiting=null; document.write("<style type='text/css'id='defaultpopstyle'>"); document.write(".cpoptext { background-color: #f8f8f5;color:#000000; border: 1px #000000 solid;font-color: padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: alpha(opacity=0)}"); document.write("</style>"); document.write("<div id='dypoplayer' style='position:absolute;z-index:1000;' class='cpoptext'></div>"); function showpopuptext(){
var o=event.srcelement; mousex=event.x; mousey=event.y; if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""}; if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""}; if(o.dypop!=spop) { spop=o.dypop; cleartimeout(curshow); cleartimeout(tfadeout); cleartimeout(tfadein); cleartimeout(tfadewaiting); if(spop==null || spop=="") { dypoplayer.innerhtml=""; dypoplayer.style.filter="alpha()"; dypoplayer.filters.alpha.opacity=0; } else { if(o.dyclass!=null) popstyle=o.dyclass else popstyle="cpoptext"; curshow=settimeout("showit()",tpopwait); } } } function showit(){ dypoplayer.classname=popstyle; dypoplayer.innerhtml=spop; popwidth=dypoplayer.clientwidth; popheight=dypoplayer.clientheight; if(mousex+12+popwidth>document.body.clientwidth) popleftadjust=-popwidth-24 else popleftadjust=0; if(mousey+12+popheight>document.body.clientheight) poptopadjust=-popheight-24 else poptopadjust=0; dypoplayer.style.left=mousex+12+document.body.scrollleft+popleftadjust; dypoplayer.style.top=mousey+12+document.body.scrolltop+poptopadjust; dypoplayer.style.filter="alpha(opacity=0)"; fadeout(); } function fadeout(){ if(dypoplayer.filters.alpha.opacity<popopacity) { dypoplayer.filters.alpha.opacity+=showpopstep; tfadeout=settimeout("fadeout()",1); } else { dypoplayer.filters.alpha.opacity=popopacity; tfadewaiting=settimeout("fadein()",tpopshow); } } function fadein(){ if(dypoplayer.filters.alpha.opacity>0) { dypoplayer.filters.alpha.opacity-=1; tfadein=settimeout("fadein()",1); } } document.onmouseover=showpopuptext; </script> //插入文字 document.onclick =function(){
var osource = window.event.srcelement; if(osource.tagname!="div") return false; var sel = document.selection; if (sel!=null) { var rng = sel.createrange(); if (rng!=null) rng.pastehtml("<font color=red>插入文字</font>"); } } //netscapte下操作xml doc = new activexobject("msxml2.domdocument");
doc = new activexobject("microsoft.xmldom") ->> doc = (new domparser()).parsefromstring(sxml,'text/xml') //判斷鍵值 <html>
<meta http-equiv="content-type" content="text/html; charset=gb2312"> <head> <script language="javascript"> var ie =navigator.appname=="microsoft internet explorer"?true:false; function keydown(e) { if(!ie) { var nkey=e.which; var iekey='現(xiàn)在是ns瀏覽器'; var realkey=string.fromcharcode(e.which); } if(ie) { var iekey=event.keycode; var nkey='現(xiàn)在是ie瀏覽器'; var realkey=string.fromcharcode(event.keycode); if(event.keycode==32){realkey='\' 空格\''} if(event.keycode==13){realkey='\' 回車\''} if(event.keycode==27){realkey='\' esc\''} if(event.keycode==16){realkey='\' shift\''} if(event.keycode==17){realkey='\' ctrl\''} if(event.keycode==18){realkey='\' alt\''} } alert('ns瀏覽器中鍵值:'+nkey+'\n'+'ie瀏覽器中鍵值:'+iekey+'\n'+'實際鍵為'+realkey); } document.onkeydown = keydown; </script> </head> <body> //javascript document. <hr> <center> <h3>請按任意一個鍵。。。。</h3> </center> </body> </html> //禁止fso 1.注銷組件 regsvr32 /u scrrun.dll 2.修改progid hkey_classes_root\scripting.filesystemobject scripting.filesystemobject 3.對于使用object的用戶,修改hkey_classes_root\scripting. //省略號
<div style="width: 120px; height: 50px; border: 1px solid blue;
overflow: hidden; text-overflow:ellipsis"> <nobr>就是比如有一行文字,很長,表格內(nèi)一行顯示不下.</nobr> </div> //檢測media play版本 <ie:clientcaps id="oclientcaps" style="{behavior:url(#default#clientcaps)}" /> <script> var flash=""; wmpversion= oclientcaps.getcomponentversion("{22d6f312-b0f6-11d0-94ab-0080c74c7e95}","componentid"); if (wmpversion != "") { flash = ""; var version = wmpversion.split(","); var i; for (i = 0; i < version.length; i++) { if (i != 0) flash += "."; flash += version[i]; } document.write("您的windows media player 版本是:"+flash+"<p>"); } </script> //圖象按比例
<script language="javascript"> <!-- //圖片按比例縮放 var flag=false; function drawimage(imgd){ var image=new image(); var iwidth = 80; //定義允許圖片寬度 var iheight = 80; //定義允許圖片高度 image.src=imgd.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ imgd.width=iwidth; imgd.height=(image.height*iwidth)/image.width; }else{ imgd.width=image.width; imgd.height=image.height; } imgd.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ imgd.height=iheight; imgd.width=(image.width*iheight)/image.height; }else{ imgd.width=image.width; imgd.height=image.height; } imgd.alt=image.width+"×"+image.height; } } } //--> </script> <img src=".." onload = "drawimage(this)"> //細(xì)線select
<span style="border:1px solid #000000; position:absolute; overflow:hidden;" > <select style="margin:-2px;"> <option>1111</option> <option>11111111111111</option> <option>111111111</option> </select></span> //import
function import() { for( var i=0; i<arguments.length; i++ ) { var file = arguments[i]; if ( file.match(/\.js$/i)) document.write('<script type=\"text/javascript\" src=\"' + file + '\"></sc' + 'ript>'); else document.write('<style type=\"text/css\">@import \"' + file + '\" ;</style>'); } }; //js枚舉
function getcomputername()
{ var objwmiservice = getobject("winmgmts:root\cimv2"); for(e = new enumerator(objwmiservice) ; !e.atend() ; e.movenext()) { var getcomputer = e.item(); return getcomputer.name; } } //條件編譯 <script language=javascript> /*@cc_on @*/ /*@if (@_win32 && @_jscript_version>5) function window.confirm(str) { execscript("n = msgbox('"+ str +"', 257)", "vbscript"); return(n == 1); } @end @*/ </script> //取得innertext <script language=javascript>
/*@cc_on @*/ /*@if (@_win32 && @_jscript_version>5) function window.confirm(str) { execscript("n = msgbox('"+ str +"', 257)", "vbscript"); return(n == 1); } @end @*/ </script> //取得innertext <script language="javascript"> <!-- var xmldoc = new activexobject("msxml2.domdocument.4.0"); var currnode; xmldoc.async = false; xmldoc.async = false; xmldoc.loadxml("<tablename> 你好你阿三 大法 司法等四 </tablename>"); currnode = xmldoc.documentelement; var s = currnode.xml; var r = /\<([^\>\s]*?)[^\>]*?\>([^\<]*?)\<\/\1\>/ var b = s.replace(r,"$2"); alert(b); //--> </script> //mergeattributes 復(fù)制所有讀/寫標(biāo)簽屬性到指定元素。 <script>
function fnmerge(){ osource.children[1].mergeattributes(osource.children[0]); } </script> <span id=osource> <div id="odiv" attribute1="true" attribute2="true" onclick="alert('click');" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#000000';" > this is a sample <b>div</b> element. </div> <div id="odiv2"> this is another sample <b>div</b> element. </div> </span> <input type="button" value="merge attributes" onclick="fnmerge()" > <span style="border:1px solid #000000; position:absolute; overflow:hidden;" >
<select style="margin:-2px;"> <option>1111</option> <option>11111111111111</option> <option>111111111</option> </select></span> //import
function import() { for( var i=0; i<arguments.length; i++ ) { var file = arguments[i]; if ( file.match(/\.js$/i)) document.write('<script type=\"text/javascript\" src=\"' + file + '\"></sc' + 'ript>'); else document.write('<style type=\"text/css\">@import \"' + file + '\" ;</style>'); } }; //js枚舉
<script language="javascript"> <!-- //圖片按比例縮放 var flag=false; function drawimage(imgd){ var image=new image(); var iwidth = 80; //定義允許圖片寬度 var iheight = 80; //定義允許圖片高度 image.src=imgd.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ imgd.width=iwidth; imgd.height=(image.height*iwidth)/image.width; }else{ imgd.width=image.width; imgd.height=image.height; } imgd.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ imgd.height=iheight; imgd.width=(image.width*iheight)/image.height; }else{ imgd.width=image.width; imgd.height=image.height; } imgd.alt=image.width+"×"+image.height; } } } //--> </script> <img src=".." onload = "drawimage(this)"> <ie:clientcaps id="oclientcaps" style="{behavior:url(#default#clientcaps)}" /> <script> var flash=""; wmpversion= oclientcaps.getcomponentversion("{22d6f312-b0f6-11d0-94ab-0080c74c7e95}","componentid"); if (wmpversion != "") { flash = ""; var version = wmpversion.split(","); var i; for (i = 0; i < version.length; i++) { if (i != 0) flash += "."; flash += version[i]; } document.write("您的windows media player 版本是:"+flash+"<p>"); } </script> <div style="width: 120px; height: 50px; border: 1px solid blue; overflow: hidden; text-overflow:ellipsis"> <nobr>就是比如有一行文字,很長,表格內(nèi)一行顯示不下.</nobr> </div> <html>
<meta http-equiv="content-type" content="text/html; charset=gb2312"> <head> <script language="javascript"> var ie =navigator.appname=="microsoft internet explorer"?true:false; function keydown(e) { if(!ie) { var nkey=e.which; var iekey='現(xiàn)在是ns瀏覽器'; var realkey=string.fromcharcode(e.which); } if(ie) { var iekey=event.keycode; var nkey='現(xiàn)在是ie瀏覽器'; var realkey=string.fromcharcode(event.keycode); if(event.keycode==32){realkey='\' 空格\''} if(event.keycode==13){realkey='\' 回車\''} if(event.keycode==27){realkey='\' esc\''} if(event.keycode==16){realkey='\' shift\''} if(event.keycode==17){realkey='\' ctrl\''} if(event.keycode==18){realkey='\' alt\''} } alert('ns瀏覽器中鍵值:'+nkey+'\n'+'ie瀏覽器中鍵值:'+iekey+'\n'+'實際鍵為'+realkey); } document.onkeydown = keydown; </script> </head> <body> //javascript document. <hr> <center> <h3>請按任意一個鍵。。。。</h3> </center> </body> </html> doc = new activexobject("msxml2.domdocument");
doc = new activexobject("microsoft.xmldom") ->> doc = (new domparser()).parsefromstring(sxml,'text/xml') <script language="vbscript">
function urlencoding(vstrin) strreturn = "" for i = 1 to len(vstrin) thischr = mid(vstrin,i,1) if abs(asc(thischr)) < &hff then strreturn = strreturn & thischr else innercode = asc(thischr) if innercode < 0 then innercode = innercode + &h10000 end if hight8 = (innercode and &hff00)\ &hff low8 = innercode and &hff strreturn = strreturn & "%" & hex(hight8) & "%" & hex(low8) end if next urlencoding = strreturn end function function bytes2bstr(vin) strreturn = "" for i = 1 to lenb(vin) thischarcode = ascb(midb(vin,i,1)) if thischarcode < &h80 then strreturn = strreturn & chr(thischarcode) else nextcharcode = ascb(midb(vin,i+1,1)) strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode)) i = i + 1 end if next bytes2bstr = strreturn end function dim stra,oreq stra = urlencoding("submit1=submit&text1=中文") set oreq = createobject("msxml2.xmlhttp") oreq.open "post","http://servername/vdir/tstresult.asp",false oreq.setrequestheader "content-length",len(stra) oreq.setrequestheader "content-type","application/x-www-form-urlencoded" oreq.send stra msgbox bytes2bstr(oreq.responsebody) </script> //readystate是xmlhttp返回數(shù)據(jù)的進(jìn)度,0=載入中,1=未初始化,2=已載入,3=運(yùn)行中,4=完成 function getxml(url) { var xmlhttp = new activexobject("microsoft.xmlhttp"); xmlhttp.open("get",url, false); try { xmlhttp.send(); } catch(e){} finally { var result = xmlhttp.responsetext; if(result) { if(xmlhttp.status==200) { return(true); } else { return(false); } } else { return(false); } } } //post代替form <script language="vbscript">
function urlencoding(vstrin) strreturn = "" for i = 1 to len(vstrin) thischr = mid(vstrin,i,1) if abs(asc(thischr)) < &hff then strreturn = strreturn & thischr else innercode = asc(thischr) if innercode < 0 then innercode = innercode + &h10000 end if hight8 = (innercode and &hff00)\ &hff low8 = innercode and &hff strreturn = strreturn & "%" & hex(hight8) & "%" & hex(low8) end if next urlencoding = strreturn end function function bytes2bstr(vin) strreturn = "" for i = 1 to lenb(vin) thischarcode = ascb(midb(vin,i,1)) if thischarcode < &h80 then strreturn = strreturn & chr(thischarcode) else nextcharcode = ascb(midb(vin,i+1,1)) strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode)) i = i + 1 end if next bytes2bstr = strreturn end function dim stra,oreq stra = urlencoding("submit1=submit&text1=中文") set oreq = createobject("msxml2.xmlhttp") oreq.open "post","http://servername/vdir/tstresult.asp",false oreq.setrequestheader "content-length",len(stra) oreq.setrequestheader "content-type","application/x-www-form-urlencoded" oreq.send stra msgbox bytes2bstr(oreq.responsebody) </script> //readystate是xmlhttp返回數(shù)據(jù)的進(jìn)度,0=載入中,1=未初始化,2=已載入,3=運(yùn)行中,4=完成 <script language="vbscript"> function urlencoding(vstrin) strreturn = "" for i = 1 to len(vstrin) thischr = mid(vstrin,i,1) if abs(asc(thischr)) < &hff then strreturn = strreturn & thischr else innercode = asc(thischr) if innercode < 0 then innercode = innercode + &h10000 end if hight8 = (innercode and &hff00)\ &hff low8 = innercode and &hff strreturn = strreturn & "%" & hex(hight8) & "%" & hex(low8) end if next urlencoding = strreturn end function function bytes2bstr(vin) strreturn = "" for i = 1 to lenb(vin) thischarcode = ascb(midb(vin,i,1)) if thischarcode < &h80 then strreturn = strreturn & chr(thischarcode) else nextcharcode = ascb(midb(vin,i+1,1)) strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode)) i = i + 1 end if next bytes2bstr = strreturn end function dim stra,oreq stra = urlencoding("submit1=submit&text1=中文") set oreq = createobject("msxml2.xmlhttp") oreq.open "post","http://servername/vdir/tstresult.asp",false oreq.setrequestheader "content-length",len(stra) oreq.setrequestheader "content-type","application/x-www-form-urlencoded" oreq.send stra msgbox bytes2bstr(oreq.responsebody) </script> //readystate是xmlhttp返回數(shù)據(jù)的進(jìn)度,0=載入中,1=未初始化,2=已載入,3=運(yùn)行中,4=完成 (1)拖拽訪問 event.datatransfer.setdata("url", oimage.src); simageurl = event.datatransfer.getdata("url") (2)普通訪問 window.clipboarddata.setdata("text",osource.innertext); window.clipboarddata.getdata("text"); <html>
<head> <meta name="save" content="history"> <style> .shistory {behavior:url(#default#savehistory);} </style> </head> <body> <input class=shistory type=text id=opersistinput> </body> </html> <p style="page-break-after:always">page1</p>
<p style="page-break-after:always">page2</p> <meta name="robots" content="屬性值">
其中屬性值有以下一些: 屬性值為"all": 文件將被檢索,且頁上鏈接可被查詢; 屬性值為"none": 文件不被檢索,而且不查詢頁上的鏈接; 屬性值為"index": 文件將被檢索; 屬性值為"follow": 查詢頁上的鏈接; 屬性值為"noindex": 文件不檢索,但可被查詢鏈接; 屬性值為"nofollow": <object id=min classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="minimize"></object> <object id=max classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="command" value="maximize"></object> <object id=close classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="command" value="close"></object> <input type=button value=最小化 onclick=min.click()> <input type=button value=最大化 onclick=max.click()> <input type=button value=關(guān)閉 onclick=close.click()> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> <meta http-equiv="expires" content="0"> <input type=button value=導(dǎo)入收藏夾 onclick="window.external.importexportfavorites(true,'');">
<input type=button value=導(dǎo)出收藏夾 onclick="window.external.importexportfavorites(false,'');"> <input type=button value=整理收藏夾 onclick="window.external.showbrowserui('organizefavorites', null)"> <input type=button value=語言設(shè)置 onclick="window.external.showbrowserui('languagedialog', null)"> <input type=button value=加入收藏夾 onclick="window.external.addfavorite('http://www.google.com/', 'google')"> <input type=button value=加入到頻道 onclick="window.external.addchannel('http://www.google.com/')"> <input type=button value=加入到頻道 onclick="window.external.showbrowserui('privacysettings',null)"> <input type=text onkeypress="return event.keycode>=48&&event.keycode<=57||(this.value.indexof('.')<0?event.keycode==46:false)" onpaste="return !clipboarddata.getdata('text').match(/\d/)" ondragenter="return false">
該文章在 2010/7/28 18:05:19 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |