日期:2014-05-16  浏览次数:20333 次

js方法应用(转)

  1. 如果你找的javascript的东西的话,建议你 ctrl+F 直接在这个页上找

  1. ?
    1. 事件源对象

  2. event.srcElement.tagName?
    event.srcElement.type
  3. 捕获释放?
    event.srcElement.setCapture();?
    event.srcElement.releaseCapture();
  4. 事件按键?
    event.keyCode?
    event.shiftKey?
    event.altKey?
    event.ctrlKey
  5. 事件返回值?
    event.returnValue
  6. 鼠标位置?
    event.x?
    event.y
  7. 窗体活动元素?
    document.activeElement
  8. 绑定事件?
    document.captureEvents(Event.KEYDOWN);
  9. 访问窗体元素?
    document.all("txt").focus();?
    document.all("txt").select();
  10. 窗体命令?
    document.execCommand
  11. 窗体COOKIE?
    document.cookie
  12. 菜单事件?
    document.oncontextmenu
  13. 创建元素?
    document.createElement("SPAN");