<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg" onload="init(evt)">
<defs>
       <script type="text/javascript">
       <![CDATA[
   var  svgdoc,svgroot;
   var  shape,shapetag,shapeobj,curshape;
   var    message;
     function init(evt)
      {
    svgdoc = evt.target.ownerDocument;
        svgroot = svgdoc.rootElement; 
shape=svgdoc.getElementById("shape");

message=svgdoc.getElementById("divl");
       }
   function SetShape(mousedown_event)
   {
   shapetag=mousedown_event.target.tagName;
   shapeobj=shape.childNodes;
    for(i=0;i<shapeobj.length;i++)
        {
          if(shapeobj.item(i).tagName==shapetag)
          {
            curshape=shapetag.charAt(0);
            shapeobj.item(i).style.setProperty("stroke-width","3px","");
          }
          else if(shapeobj.item(i).nodeType==1)
          {
            shapeobj.item(i).style.setProperty("stroke-width","1px","");
          }
        }
   }
   function showdiv(e)
   {       
   message.style.display = "block";   
       if (!e) e = window.event;       
   if (e.pageX) {            tx = e.pageX;            ty = e.pageY;        }    
   if (e.clientX) 
   {        
      tx = e.clientX;        
      ty = e.clientY;     
   }      
      message.style.left = tx +10 + "px";    
       message.style.top = ty +10 + "px";  
 }   
     
function hiddiv()
      {       
  message.style.display = "none";   
  } 
  
   ]]>
   </script>
</defs><g id="shape" onclick="SetShape(evt)" onmousemove="showdiv()" onmouseout="hiddiv()">
   <line x1="0" y1="0" x2="300" y2="300"
     style="stroke:rgb(99,99,99);stroke-width:2"/>
  
  <circle id="c" cx="25" cy="395" r="10"
      style="stroke: #000; stroke-width: 1px; fill: #FFF"/>
</g>
  <div id="divl" style="position: absolute; width: 126px; height: 27px; background-color: orange; display:none; left: 11px; top: 36px">直线</div>
  
</svg>脚本