这个AJAX哪里错了呢
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档 </title>
</head>
<script language="JavaScript" type="text/JavaScript">
function Login(username,password)
{
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlHttp.open("POST", "2-1.asp?username="+username+"&password="+password,false)
xmlHttp.send()
var re=xmlHttp.responseText;
//alert(re);
//setTimeout("Login(sendvalue.username.value,sendvalue.password.value)",1000);
}
</script>
<body>
<form method=post name=sendvalue>
<input type=text name=username>
<input type=password name=password>
<input name="ok" type="button" value="/提交" onClick="Login(sendvalue.username.value,sendvalue.password.value)">
</form>
<div id="re"> </div>
</body>
</html>
2-1.asp文件如下:
<%
response.Write request("username")
response.Write request("password")
%>
<script language="JavaScript" typ
相关问答:
如题。
同样的代码,我在aspx页面中就是能执行的;
放在js文件中,通过引用使用就不行了,为什么?
我猜是ScriptManager的原因;
能在js文件中引入ScriptManager么?
up
把导入代码移到aspx执行 ......
我的页面里用的AJAX控件 但页面静止一段时间就会出现上面的一个错误是怎么会事呀 怎么解决啊
高手帮帮忙啊
将项目上级目录中的中文名称全部改成英文
楼上说的很清楚了。帮顶一下吧
这个问题不是很常 ......
function Fun1(para1,para2)
{
Fun2(para1);
....
要求是:在得到ajax方法的返回值后,
再使用para2(para2是一个javascript变量)
问题就是,
&nb ......
C# code:
<script type="text/javascript">
function get(aid){
$.ajax({
url:"t2.aspx?id="+aid+" & time="+new Date().toString(),
ty ......