zoukankan      html  css  js  c++  java
  • 第一个XMLHTTP测试成功![原创]

    testxmlhttp.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        
    <title>XmlHttp测试</title>
        
    <script type="text/javascript">
        
    function testxml()
        
    {
            
    var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
            xmlhttp.open('POST','xmlhttp.aspx
    ?name='+document.getElementById('Text1').value,false);
            xmlhttp.send();
            alert(xmlhttp.responseText);
        }

        
    </script>
    </head>
    <body>
        
    <input id="Text1" maxlength="20" type="text" />
        
    <input id="Button1" type="button" value="button"  onclick="testxml()"/>
    </body>
    </html>
    xmlhttp.aspx没有内容
    xmlhttp.aspx.cs
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;

    public partial class xmlhttp : System.Web.UI.Page
    {
        
    protected void Page_Load(object sender, EventArgs e)
        
    {
            
    if (Request.QueryString["name"!= null
            
    {
                Response.Clear();
                Response.Write(
    "您好:"+Request.QueryString["name"].ToString());
                Response.Flush();
                Response.End();

            }

        }

    }


  • 相关阅读:
    java实现遍历树形菜单方法——service层
    Es 中一个分片一般设置多大
    Too Many Open Files的错误
    线程池队列满导致错误
    ES正在弱化type这个概念
    更新设置api
    遥控器 静音键 点播键
    Byzantine failures
    TGI指数
    墨菲定律(Murphy's Law)
  • 原文地址:https://www.cnblogs.com/ghx88/p/426216.html
Copyright © 2011-2022 走看看