'글자 순간이동하기...'에 해당되는 글 1건

  1. 2009.12.02 글자 순간이동하기...
반응형

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="utf-8">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>애니메이션</title>
  <script type="text/javascript" src="addLoadEvent.js"></script>
  <script type="text/javascript" src="domEx10_1.js"></script>
  <!--
  <script type="text/javascript" src="highlightRows.js"></script>
  -->
  <!--
  <link rel="stylesheet" type="text/css" href="format.css"/>
  -->
 </head>
 <body>
  <p id="message">야호</p>
 </body>
</html>



----------------------------------------------
function positionMessage() {
   if (!document.getElementById) return false;
   if (!document.getElementById("message")) return false;
   var elem = document.getElementById("message");
   elem.style.position = "absolute";
   elem.style.left = "50px";
   elem.style.top = "100px";
   /*
   moveElement("message",125,25,20);
   if (!document.getElementById("message2")) return false;
   var elem = document.getElementById("message2");
   elem.style.position = "absolute";
   elem.style.left = "50px";
   elem.style.top = "50px";
   moveElement("message2",125,75,20);
   */
 
   setTimeout("moveMessage()",5000);
}
function moveMessage(){
 var elem = document.getElementById("message");
 elem.style.left="200px";
}

addLoadEvent(positionMessage);
//addLoadEvent(moveMessage);

Posted by 1010