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") & ......
原先有一个项目是用asp写的,因为系统扩展,我想添加一些模块或网页,想用asp.net写,然后在asp中redirect到aspx文件中,请问是否可以做到,如何在IIS中进行配置。
这样可以省去很多工作量,因为系统以前是别人写的 ......
前段时间碰到一道面试题如下:
test.aspx页面有如下代码:
Response.Write(Test.GetDate());
Test类如下:
public class Test
{
static string dt="";
public static s ......
哪里出错了,输出这样的结果??
<%@ Page Language="VB" AutoEventWireup="false" aspcompat="true" CodeFile="Default.aspx.vb" Inherits="_Default" %&g ......