博文

Javascript 技巧大全(2008-10-13 17:50:00)

摘要:   Event 事件  事件源对象
event.srcElement.tagName
event.srcElement.type
捕获释放
event.srcElement.setCapture();
event.srcElement.releaseCapture();
事件按键
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
事件返回值
event.returnValue
鼠标位置
event.x
event.y document 对象 窗体活动元素
document.activeElement
绑定事件
document.captureEvents(Event.KEYDOWN);
访问窗体元素
document.all("txt").focus();
document.all("txt").select();
窗体命令
document.execCommand
窗体COOKIE
document.cookie
菜单事件
document.oncontextmenu
创建元素
document.createElement("SPAN");
根据鼠标获得元素
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);
HTML标签
document.documentElement.innerHTML
第一个style标签
document.styleShe......

阅读全文(2428) | 评论:0