锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧美日韩成人,91精品久久久久久久99蜜桃,国产精品一区二区三区美女http://www.aygfsteel.com/chenbo/zh-cnWed, 18 Jun 2025 13:50:00 GMTWed, 18 Jun 2025 13:50:00 GMT60simple ajax practicehttp://www.aygfsteel.com/chenbo/archive/2007/09/01/141893.htmlchenbochenboSat, 01 Sep 2007 03:45:00 GMThttp://www.aygfsteel.com/chenbo/archive/2007/09/01/141893.htmlhttp://www.aygfsteel.com/chenbo/comments/141893.htmlhttp://www.aygfsteel.com/chenbo/archive/2007/09/01/141893.html#Feedback0http://www.aygfsteel.com/chenbo/comments/commentRss/141893.htmlhttp://www.aygfsteel.com/chenbo/services/trackbacks/141893.html<%@ 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%>">
    <%
     
       String contextpath = request.getContextPath();
        System.out.println(contextpath);
    %>
    <title>My JSP 'test.jsp' starting page</title>
    <script>
       var ajax;
       function insertCell(){
           var url = "<%=contextpath%>/get"
       
           if(window.XMLHttpRequest){
              ajax = new XMLHttpRequest();
              if(ajax.overrideMimeType){
                 ajax.overrideMimeType('text/xml');
              }
           }else if(window.ActiveXObject){
              ajax = new ActiveXObject("Microsoft.XMLHTTP");
           }
           ajax.open("GET",url,true);
          
           ajax.onreadystatechange = processRequest;
           ajax.send();
       }
       function processRequest(){
          if(ajax.readyState == 4){
                 //alert("1111"+ajax.status);
          
              //alert(ajax.status);
              if(ajax.status == 200){
                 var response = ajax.responseText;
                 insertReportList(response);
              }
          }
       }
  function insertReportList(str) {
    var tr = "";
    var td = "";
    tr = mytable.insertRow(mytable.rows.length);
    td = tr.insertCell(0);
    td.innerHTML = str;
  
}
   </script>
  </head>
 
  <body>
    This is my JSP page. <br>
    <input type = button name = "test" value = "click" onclick = insertCell()>
    <table id = mytable>
      <tr><td>Description</td></tr>
    </table>
  </body>
</html>



chenbo 2007-09-01 11:45 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 新化县| 乌拉特中旗| 南陵县| 新源县| 伊宁县| 无棣县| 翼城县| 德化县| 邓州市| 嵩明县| 昌黎县| 铁力市| 云龙县| 永川市| 平顶山市| 雷波县| 博湖县| 施甸县| 兴文县| 平乐县| 齐河县| 韶山市| 鹰潭市| 博客| 黄石市| 明光市| 深水埗区| 通道| 双牌县| 岢岚县| 揭东县| 隆化县| 赤水市| 将乐县| 腾冲县| 泾阳县| 牡丹江市| 渝北区| 蒙自县| 阿图什市| 麻城市|