现在的位置: 首页 > 综合 > 正文

ArcIMS学习之 HTML Viewer定制笔记 续五(5.Javascript纪要)

2013年09月08日 ⁄ 综合 ⁄ 共 951字 ⁄ 字号 评论关闭

1.另一个Frame中的JavaScript变量:
 var 可在其他框架中使用:
  Frame名.变量名 来调用
2.<Table>中
 <TR> -- Table Row
 <TD> -- Table Data
3.<IMG>元素
  <IMG src="图片路径" alt="提示"> 
4.DOM 模型
        + forms[]
        | images[]
      + frames [] -- document  -| anchors[]
        | document     |  ...
        | navigator    + applets[]
 window --| history
     | status 属性
     + location
5.事件
 1> onClick ,onLoad 等不是 事件处理函数(event handler)而是 事件 (event);
 2> 对照表
 ------------------+------------------------
  Object | Event
 ------------------+------------------------
 window,FrameSet | onLoad
 Frame   | onUnload
 ------------------+------------------------
 Button,IMG,Frame | onClick
    | onMouseDown
    | onMouseUp
    | onMouseMove
 ------------------+------------------------
 3>事件处理函数
  function startUp(){
   document.onmousedown = maptool;//maptool是函数名
   }
  function maptool(){
   ...
   }
  <body onload = "startUp()">
 4>
 event.clientX
 event.clientY 鼠标坐标,相对于包容窗口左上角

 event.offsetX
 event.offsetY 鼠标坐标,相对于源元素位置
 
 5>onUnload事件含义:
 Browser已经离开使用框架、document网页,在转入其它页之前的事件

抱歉!评论已关闭.