1 写一段JavaScript动态显示时间的代码; 
2 写一段Jdbc操作数据库的代码; 
3 写一个简单的Servlet打印"ello world"; 
 
 

解决方案 »

  1.   

    <html>
    <head>
    <title>练习</title>
    <script language="javascript">
    function showDate(){
    var nowDate = new Date();
    var time = nowDate.getHours() + "点" + nowDate.getMinutes() + "分" + nowDate.getSeconds() + "秒";
    document.getElementById("showDate").innerHTML = time;
    }

    setInterval("showDate()",1000);
    </script>
    </head>

    <body>
    <div id="showDate">
    </div>
    </body>
    </html>
      

  2.   

    response.setContentType("text/html;charset=utf-8");
    PrintWriter out = response.getWriter();
    out.println("Hello World@");
    out.close();
      

  3.   

    JDBC的这个有点麻烦...就不写了...请LZ看一下,,如果第一个问题,和第三个问题,像我这样写有问题么?、