注册 登录
编程论坛 ASP.NET技术论坛

注册没反映

chenjincheng 发布于 2013-03-11 10:00, 762 次点击
    <script type ="text/javascript" >
   
        $(function (){
            $("#Button1").click(function (){
             $.ajax({
                type: "POST",
                url:"Handler.ashx?txt="+$("#Text1").val(),
                data:"{}",
                dataType:'html',
                success:function(result){  if(result =="成功")
                    window .location ="首页.aspx";
                else
                    window .location ="注册.aspx";
             }
            });
        });
    });
    </script>
这页面有1个按钮,点击按钮,为什么会没有反映的。
4 回复
#2
Aviva_Wang2013-03-12 20:45
加一句:contentType:"application/x-www-form-urlencoded"
#3
chenjincheng2013-03-13 08:39
加在哪里?
#4
Aviva_Wang2013-03-13 09:49
dataType下面就行了
#5
chenjincheng2013-03-13 09:58
谢谢,虽然我已经自己解决了,但还是非常感谢。
1