javascript的疑问????????????

<%@ 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 'ddd.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">
-->

  </head>
 
  <body>
  

  
  
<input type="text"   id='time' onchange="appinit()"></input>  
  </body>
<script   language='javascript'>
function appinit(){

alert("我在变化");
}




  
  function   getdate() 
  {//时钟函数 
  mydate=new   Date(); 
  nowhours=mydate.getHours(); 
  nowminiutes=mydate.getMinutes(); 
  nowseconds=mydate.getSeconds(); 
  nowday=mydate.getDay(); 
  weekname=new   Array(7) 
  weekname[1]='星期一'; 
  weekname[2]='星期二'; 
  weekname[3]='星期三'; 
  weekname[4]='星期四'; 
  weekname[5]='星期五'; 
  weekname[6]='星期六'; 
  weekname[0]='星期日'; 
  var   now=""; 
  if(nowhours<10) 
  nowhours='0'+nowhours; 
  if(nowminiutes<10) 
  nowminiutes='0'+nowminiutes; 
  if(nowseconds<10) 
  nowseconds='0'+nowseconds; 
  now+=nowhours+':'+nowminiutes+':'+nowseconds+weekname[nowday];
  var time=document.getElementById("time"); 
  time.value=""+now;   
  setTimeout("getdate()",1000);   
  } 
  getdate();   //触发时钟   
  </script>  
</html>







谁帮我看下 怎么appinit()函数不能触发        求救。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

你可能感兴趣的:(JavaScript,java,html,jsp)