正常情况下是没有问题的.
<script >
var xmlHttp = new ActiveXObject("Microsoft.XmlHttp");
xmlHttp.open("POST","test.ashx?a",false);
xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
xmlHttp.send("A=1&b=2");
var str = xmlHttp.responseText
alert(xmlHttp.status)
alert(str );
</script>
看看你asxh中写了些什么?

解决方案 »

  1.   

    http://download.csdn.net/source/782646
    我把xmlhttprequest总结了一下,你看看是不是基本功的问题。
      

  2.   

    我用这个xmlhttp好象还没有成功过,
    其实我的ashx中什么都没有就是个空的 ,如下
    <%@ WebHandler Language="C#" Class="Handler" %>using System;
    using System.Web;public class Handler : IHttpHandler {
        
        public void ProcessRequest (HttpContext context) {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
        }
     
        public bool IsReusable {
            get {
                return false;
            }
        }}
      

  3.   

    to greatverve 
    分没了,下不了了.
      

  4.   

    to cpp2017,
    第一次出错;
    msxml3.dll: 指定资源下载失败。
    中断后再次运行
    msxml3.dll: 未指定的错误
      

  5.   

    有可能是你的iis中aspx的操作权限问题,看看是不是有POST权限
      

  6.   

    iis目录属性中,虚拟目录,映射,找到ashx
      

  7.   

    建议用iis来做web服务器 来设置
      

  8.   

    to xjb(www.watch-life.net)
    没有太明白你的意思?
    vs 是不是自己带一发虚拟的iis服务呀?
      

  9.   

    to 慕白兄
    我刚才查看过了 ashx有四种权限:GET,HEAD,POST,DEBUG