ASP+AJAX的问题
VBScript code:
Dim FoundErr,MsgErr
FoundErr = true
username=request.QueryString("userName")
password=request.QueryString("userPwd")
MsgErr = ""
if username = "" then
MsgErr = MsgErr & "用户名为空"
End if
if password = "" then
MsgErr = MsgErr & "密码为空"
End if
if FoundErr = true then
Response.write MsgErr
Else
Response.write "OK"
End if
JScript code:
$.ajax({
type:"GET",
url:"checkLogin.asp?userName="+escape(userName)+"&userPwd="+escape(userPwd)+"&time="+new Date().toString(),
success:function(msg){
alert(msg)
}
})
直接运行ASP页面输出"用户名为空密码为空"
那么JS部分
当FoundErr为true 时 msg应该为"用户名为空密码为空",可是msg="",为False时msg=OK.
这说明当FoundErr为true 时 JS获取不到ASP页面输出"用户名为空密码为空",问题出在哪里呢?
那个贴个全的
JScript code:
$(document).ready(function(){
$("#login").click(function(){
相关问答:
我找了一个伪静态代码,如下:
index.asp
<!--#include file="config.asp"-->
<ol>
<%
Set rs=server.CreateObject("adodb.recordset") & ......
<?php
if($_SERVER['HTTP_REFERER']!=''){
@header("Content-type:image/jpeg");
echo file_get_contents("xlight.jpg");
}
else{
@header("location:ht ......
ASP.NET MVC架构发布了,你用了吗?
还在学习中
我也在学习。买书,听教程,看网上资料,下载例子,感觉听不错的,不过比起工厂模式,似乎逊色了点。。。欢迎到我博客互相学习
都用了5个版本了 从 PV1 到beta ......