And the creation of the provisional target coordinates the DIV

Related Tags:

  <DOCTYPE html PUBLIC "- / / w3c / / DTD XHTML 1.0 Transitional / / EN" 
  "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html>
<head>
  <title> Create and target coordinates of the Council of DIV </ title> 
  <script Language="javascript"> 
  <! -- 


  Function getXY (Obj) 
  ( 
  / / This method from bbs.51js.com Baoyu 
  For (var sumTop = 0, sumLeft = 0; Obj! = Document.body; sumTop + = Obj.offsetTop, sumLeft + = Obj.offsetLeft, Obj = Obj.offsetParent); 
  Return (left: sumLeft, top: sumTop) 
  ) 
  Function getCellPos () 
  ( 
  Document.getElementById ( 'cellPos')? Document.getElementById (' cellPos'). RemoveNode (true ):""; 
  Var pos = getXY (event.srcElement); 
  Var temp = document.createElement ( "DIV"); 
  Temp.style.position = "absolute"; 
  Temp.style.width = event.srcElement.width; 
  Pos.left temp.style.left = +10; 
  Temp.style.top = pos.top-6; 
  Temp.style.border = 1; 
  Temp.style.background = "# 969696"; 
  Temp.style.color = "# FFFFFF"; 
  Temp.id = "cellPos"; 
  Temp.innerHTML = "<marquee scrollamount='2'> left:" + + pos.left "| top:" + + pos.top "</ marquee>"; 
  Document.body.appendChild (temp); 
  ) 
  / / -> 
  </ Script> 

  <style Type="text/css"> 
  <! -- 
  Td ( 
  Font-size: 12px; 
  Text-decoration: none; 
  ) 
-->
  </ Style> 
  </ Head> 

<body>
  <table Width="868" cellpadding="6" bgcolor="#969696" onclick="getCellPos()"> 
<tr>
  <td Width="213" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="199" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="214" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="232" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  </ Tr> 
<tr>
  <td Width="213" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="199" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="214" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="232" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  </ Tr> 
<tr>
  <td Width="213" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="199" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="214" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  <td Width="232" bgcolor="#E0E0E0"> click on the cell above location to create DIV </ td> 
  </ Tr> 
  </ Table> 

  </ Body> 
  </ Html> 




Related articles:

Ajax read by the data in XML format
  Ajax read by the data in XML format, need only read XMLHttpRequest object can be returned to the responseXML property.    Code as follows:    1, Client - helloworld.htm  Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-...
AJAX an entry - AJAX installation and the installation of ASP.NET AJAX Documentation configuration
  AJAX on the concept of the Internet has a lot of information can make reference to, but how to make real AJAX application for those of us with a new and difficult, and we here on how to install and configure AJAX, and how to make AJAX documents can be run on your server.    Start w...
FLASH call Concise Guide to XML data
  First, the establishment of XML object:    Var myXML = new XML ();    Second, to use XML documents:    MyXML.load ( "data.xml");    Third, neglected spaces:    MyXML.ignoreWhite = true; / / default for false    4, pro...
Simulation models introduced WAP browser tool (available for download)
  1, WinWAP3.0    Description:    Winwap is Slobtrot the WAP site offers simulation tool.    It supports WML 1.0 and 1.1.    WML pages can be saved as HTML pages.    I tested this, a good interface, and more useful.    WINDOWS in th...
Dreamweaver MX 2004 Video Collection Guide (5)
  Article 05 sets: the principle of color    Course Objectives: To color and style with the basic principles of design.    Curriculum points: Web design pleasing to achieve the purpose, it was necessary to match the color and style of the design.    [Full-screen...