欢迎来到天天文库
浏览记录
ID:37923377
大小:124.00 KB
页数:25页
时间:2019-06-02
《javascript 常用事件》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、事件源對象event.srcElement.tagNameevent.srcElement.type捕獲釋放event.srcElement.setCapture();event.srcElement.releaseCapture();事件按鍵event.keyCodeevent.shiftKeyevent.altKeyevent.ctrlKey事件傳回值event.returnvalue滑鼠游標位置event.xevent.y窗體活動元素document.activeElement鎖定事件document.captureEvents(Even
2、t.KEYDOWN);瀏覽窗體元素document.all("txt").focus();document.all("txt").select();窗體命令document.execCommand窗體COOKIEdocuments.cookie選單事件document.oncontextmenu建立元素document.createElement("SPAN");根據滑鼠游標獲得元素document.elementFromPoint(event.x,event.y).tagName=="TDdocument.elementFromPoint(e
3、vent.x,event.y).appendChild(ms)25窗體圖片document.images[索引]窗體事件鎖定document.onmousedown=scrollwindow;元素document.窗體.elements[索引]對象鎖定事件document.all.xxx.detachEvent(''onclick'',a);外掛數目navigator.plugins取變數類型typeof($js_libpath)=="undefined"下拉選單下拉選單.options[索引]下拉選單.options.length搜尋對象do
4、cument.getElementsByName("r1");document.getElementById(id);定時timer=setInterval(''scrollwindow()'',delay);clearInterval(timer);UNCODE編碼escape(),unescape父對象obj.parentElement(dhtml)obj.parentNode(dom)交換表的行TableID.moveRow(2,1)代換CSSdocument.all.csss.href="a.css";並排顯示display:inlin
5、e25隱藏焦點hidefocus=true根據寬度換行style="word-break:break-all"自動Reload簡單郵件快速轉到位置obj.scrollIntoView(true)錨anchors網頁傳遞參數location.search(
6、);可編輯obj.contenteditable=true執行選單命令obj.execCommand雙字元字元/[^x00-xff]/漢字/[u4e00-u9fa5]/讓英文字元串超出表格寬度自動換行word-wrap:break-word;word-break:break-all;透明背景獲得style內容obj.style.cssTextHTML標籤document.documentElement.inne
7、rHTML25第一個style標籤document.styleSheets[0]style標籤裡的第一個樣式document.styleSheets[0].rules[0]防止點選空連結時,頁面往往重置到頁首端word上一網頁源asp:request.servervariables("HTTP_REFERER")javascript:document.referrer釋放內存CollectGarbage();禁止右鍵document.oncontextmenu=functio
8、n(){returnfalse;}禁止儲存禁止選取<
此文档下载收益归作者所有