js的会走的层

来源:互联网 发布:华师大网络教育报名 编辑:程序博客网 时间:2024/05/17 06:35

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>My JSP 'c.jsp' starting page</title>
   
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->
 <script type="text/javascript">
  show = function()
  {
   var div = document.getElementsByTagName("div")[0];
   div.style.left = parseInt(div.style.left) + 4 + "px" ;
   div.style.position = "absolute";
  }
  //setTimeout("show()",500);
  setInterval("show()",500);
 </script>
  </head>
 
  <body>
  <div style="border: 1px solid red; width: 60px; left: 2px">
   asdasd
  </div>
  </body>
</html>