在地图的onclick事件中用JS取得当前鼠标坐标,然后在该位置上新加一个层即可;

解决方案 »

  1.   

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
    <script>DivID=10;</script>
    <script>function drawboxdown(thelayer){
      theoffsetX=document.body.scrollLeft+event.clientX;
      theoffsetY=document.body.scrollTop+event.clientY;
      lll.innerHTML+="<div id=Layer"+DivID+" style=\"position:absolute; left:"+theoffsetX+"px; top:"+theoffsetY+"px; width:3px; height:3px; z-index:2;   border: 1px solid #000000; visibility: visible;cursor:crosshair;font-size:1pt;background-color: #9FFB96;\" ></div>";
      DivID++;
    }
    </script>
    <span id=lll> </span> 
    <table width="1090" border="0" cellspacing="0" cellpadding="0" height="773" background="%B7%B1%B2%FD%B1%E4%B5%E7%CB%F9%D2%BB%B4%CE%BD%D3%CF%DF%CD%BC.jpg">
      <tr>
        <td id="disparea"  style="cursor:crosshair" onclick="drawboxdown('')"> 
        </td>
      </tr>
    </table></body>
    </html>
      

  2.   

    借<script language="JavaScript" type="text/JavaScript">
    function addmap(){
       map.filters.Light.addCone(event.x, event.y-25, 15, event.x, event.y-25, 255,255,255,120,45);
    }   
    </script>
    <body topmargin=0 leftmargin=0>
    <DIV onclick="addmap()" id=map style="CURSOR: hand; FILTER: Light; OVERFLOW: hidden; WIDTH: 490px; HEIGHT: 517px; BACKGROUND-COLOR: mediumblue"><FONT 
    id=world style="FONT-SIZE: 185px; LEFT: 0px; COLOR: green; FONT-FAMILY: Webdings; POSITION: relative; TOP: -26px">a b c d e f g h i g k l m n o p q r s t</FONT></DIV>
    <script>
       map.filters.Light.Clear();
       map.filters.Light.addAmbient(255,255,255,60);
    </script>
    </body>:)