<%!         
            String dt;
            
            Thread t1 = new Thread(new Runnable() {
            public void run() {
                 while(true){                    
                            java.util.Date date=new java.util.Date();
                            dt=date.toLocaleString();
                         try {
                           Thread.sleep(1000);
                          } catch (InterruptedException ex) {
                                 ex.printStackTrace();
                          }
                        //  out.print(dt);
                             //System.out.println(dt);     
                 }
            }
        }
        );
        
        
    //    out.print(dt);
         // out.print("<script>document.getElementById('div1').innerHTML='"+info+"';</script>");
%>
<%
t1.start();
%>
<%=dt
%>


请高手看一下 上面是我写的,但是有错误,不知道是什么原因 本人刚刚学jsp有的不明白