javascript 事件查詢綜合 推薦收藏
2024-05-06 14:11:08
供稿:網(wǎng)友
click() 對象.click() 使對象被點擊。
closed 對象.closed 對象窗口是否已關(guān)閉true/false
clearTimeout(對象) 清除已設(shè)置的setTimeout對象
clearInterval(對象) 清除已設(shè)置的setInterval對象
confirm("提示信息") 彈出確認(rèn)框,確定返回true取消返回false
cursor:樣式 更改鼠標(biāo)樣式 hand crosshair text wait help default auto e/s/w/n-resize
event.clientX 返回最后一次點擊鼠標(biāo)X坐標(biāo)值;
event.clientY 返回最后一次點擊鼠標(biāo)Y坐標(biāo)值;
event.offsetX 返回當(dāng)前鼠標(biāo)懸停X坐標(biāo)值
event.offsetY 返回當(dāng)前鼠標(biāo)懸停Y坐標(biāo)值
document.write(document.lastModified) 網(wǎng)頁最后一次更新時間
document.ondblclick=x 當(dāng)雙擊鼠標(biāo)產(chǎn)生事件
document.onmousedown=x 單擊鼠標(biāo)鍵產(chǎn)生事件
document.body.scrollTop; 返回和設(shè)置當(dāng)前豎向滾動條的坐標(biāo)值,須與函數(shù)配合,
document.body.scrollLeft; 返回和設(shè)置當(dāng)前橫向滾動務(wù)的坐標(biāo)值,須與函數(shù)配合,
document.title document.title="message"; 當(dāng)前窗口的標(biāo)題欄文字
document.bgcolor document.bgcolor="顏色值"; 改變窗口背景顏色
document.Fgcolor document.Fgcolor="顏色值"; 改變正文顏色
document.linkcolor document.linkcolor="顏色值"; 改變超聯(lián)接顏色
document.alinkcolor document.alinkcolor="顏色值"; 改變正點擊聯(lián)接的顏色
document.VlinkColor document.VlinkColor="顏色值"; 改變已訪問聯(lián)接的顏色
document.forms.length 返回當(dāng)前頁form表單數(shù)
document.anchors.length 返回當(dāng)前頁錨的數(shù)量
document.links.length 返回當(dāng)前頁聯(lián)接的數(shù)量
document.onmousedown=x 單擊鼠標(biāo)觸發(fā)事件
document.ondblclick=x 雙擊鼠標(biāo)觸發(fā)事件
defaultStatus window.status=defaultStatus; 將狀態(tài)欄設(shè)置默認(rèn)顯示
function function xx(){...} 定義函數(shù)
isNumeric 判斷是否是數(shù)字
innerHTML xx=對象.innerHTML 輸入某對象標(biāo)簽中的html源代碼
innerText divid.innerText=xx 將以div定位以id命名的對象值設(shè)為XX
location.reload(); 使本頁刷新,target可等于一個刷新的網(wǎng)頁
Math.random() 隨機涵數(shù),只能是0到1之間的數(shù),如果要得到其它數(shù),可以為*10,再取整
Math.floor(number) 將對象number轉(zhuǎn)為整數(shù),舍取所有小數(shù)
Math.min(1,2) 返回1,2哪個小
Math.max(1,2) 返回1,2哪個大
navigator.appName 返回當(dāng)前瀏覽器名稱
navigator.appVersion 返回當(dāng)前瀏覽器版本號
navigator.appCodeName 返回當(dāng)前瀏覽器代碼名字
navigator.userAgent 返回當(dāng)前瀏覽器用戶代標(biāo)志
onsubmit onsubmit="return(xx())" 使用函數(shù)返回值
opener opener.document.對象 控制原打開窗體對象
prompt xx=window.prompt("提示信息","預(yù)定值"); 輸入語句
parent parent.框架名.對象 控制框架頁面
return return false 返回值
random 隨機參數(shù)(0至1之間)
reset() form.reset(); 使form表單內(nèi)的數(shù)據(jù)重置
split("") string.split("") 將string對象字符以逗號隔開