首頁  >  文章  >  web前端  >  製作網頁過程中可以參考的一些JAVASCRIPT技術

製作網頁過程中可以參考的一些JAVASCRIPT技術

黄舟
黄舟原創
2016-12-14 15:54:321022瀏覽

事件來源物件 
event.srcElement.tagName 
event.srcElement.type 
擷取釋放 
event.srcElement.setCapture(); 
event.srcElement.releaseCapture(); oevent. .altKey 
event.ctrlKey 
事件回傳值 
event.returnValue 
滑鼠位置 
event.x 
event.y 
窗體活動元素 窗體元素 
document.all("txt").focus(); 
document.all("txt").select(); 
窗體指令 
document.execCommand 
窗體COOKIE 
document.execCommand 
ookie程式碼
document.oncontextmenu 
創建元素 
document.createElement("SPAN"); 
根據滑鼠取得元素: 
document.elementFromPoint(event.x,event.y).tagName=="TD . ,event.y).appendChild(ms) 
窗體圖片 
document.images[索引] 
窗體事件綁定 
document.onmousedown=scrollwindow; 
元素事件 
document.all.xxx.detachEvent('onclick',a); 
插件數目 
navigator.plugins 
取變數類型 
typeof($js_libpathpath) == "undefined"p
下拉框.options.length 
查找物件 
document.getElementsByName("r1"); 
document.getElementById(id); 
定時 
timer=Interval('sroller=setInterval('sroll);
UNCODE編碼 
escape() ,unescape 
父對象 
obj.parentElement(dhtml) 
obj.parentNode(dom) 
交換錶的行 
TableID.moveRow(2,1)替代> href = "a.css"; 
並排顯示 
display:inline 
隱藏焦點 
hidefocus=true 
依寬度換行 
style="word-1break-all" " CONTENT="8;URL=http://www.webjx.com"> 
簡單郵件 
 
快速轉到位置 
object=ccc&body=xxxyyy"> 
快速轉到位置 
objyyy .scrollIntoView(true) 
錨 
 
anchors 
網頁傳遞參數 
location.search(); 
可編輯
網頁傳遞參數 
location.search(); 
可編輯true 
執行選單指令 
obj.execCommand 
雙位元組字元 
/[^x00-xff]/ 
漢字 
/[u4e00-u9fa5]/ 
讓英文字串-寬度自動word; word-break: break-all; 
透明背景 
 
取得內容 
元標籤. .documentElement.innerHTML 
第一個style標籤 
document.styleSheets[0] 
style標籤裡的第一個樣式 
document.styleSheets[0].rules[0] 
阻止點擊空document.styleSheets[0].rules[0] 
?頁首端。
word 
上一網頁來源 
asp: 
request.servervariables("HTTP_REFERER") 
script: 
document.referrer );
禁止右鍵 
document.oncontextmenu = function() { return false;} 
禁止保存 

 
禁止選取 
網址列圖示 
 
favicon.ico 名字最好不變16 *16的16色,放虛擬目錄根目錄下 
收藏列圖示 
 
查看原始碼 
 
關閉輸入法 
 
自動全選 
 
ENTER鍵可讓遊標移到下一個輸入框 
 
文字方塊的預設值 
 
titleobj 
obj 
obj .title = "123 sdfs " 
取得時間所代表的微秒 
var n1 = new Date("2004-10-10".replace(/-/g, "/")).getTime() 
視窗是否關閉
win.closed 
checkbox扁平 

 
lic勾選內容 . .text 
自動完成功能 
開啟此功能 
關閉此功能   
視窗最大化。 width - 4,window.screen.height-50);window.moveTo(-4,-4)"> 
無關機按鈕IE 
window.open("aa.htm", "meizz", "fullscreen=7" ); 
統一編碼/解碼 
alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe"))) 
encodeURIComponent對":"、"/"、";" 和"?"也編碼 
表格行指示 

 更多相關文章請關注中文PHPwww. )! 


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn