如何在ASP中实现ASP.NET同样的AJAX效果
如题 ,代码如下
display.htm:
VBScript code:
<html>
<head>
<script type="text/javascript" src="XmlHttpRequest.js"></script>
</head>
<body>
<a href="#" onclick ="sendRequest('Contacts');return false;">Contacts</a>
<a href="#" onclick ="sendRequest('Calendar');return false;">Calendar</a>
<a href="#" onclick ="sendRequest('Adverts');return false;">Adverts</a>
<br/>
<div id="box1">
</div>
<div id="box2">
</div>
<div id="box3">
</div>
</body>
</html>
XmlHttpRequest.js:
VBScript code:
var xHRObject = false;
if (window.XMLHttpRequest)
{
xHRObject = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
xHRObject = new ActiveXObject("Microsoft.XMLHTTP");
}
function sendRequest(data)
{
xHRObject.open("GET", "display.aspx?id=" + Number(new Date) +"&value=" + data, false);
xHRObject.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT' );
xHRObject.onreadystat
相关问答:
<%@language="vbscript"%>
<%option explicit%>
<html>
<head> <title>xxx </title> </head>
<script language=vbs>
'注意变量 ......
<%On Error Resume Next
Set conn=Server.CreateObject("ADODB.Connection")
conn.begintrans
conn.Open ("Driver={SQL Server};server=(local);uid=sa;database=student;pwd=")
......
文件:folder.inc
HTML code:
<%
Dim folderini,pos,pageName
fPath = Request.ServerVariables("PATH_TRANSLATED")
pos = instrRev(fPath,"\")
folderini = Left(fPath,pos)+&qu ......
现在这社会基本上不需要ASP程序员了,一面试,都要.NET或者PHP,JSP的,哎,,,,ASP这么不值钱吗,学习ASP是个错误吗
没啥错误 一句话:技多不压身
靠ASP都混不到饭吃了 晕 晕
我的意思是多学一门技术没啥错误 ......
字段PowerList里面的值:KSO10000,KSO10021,KSO10004,KSO10022,KSO10020,KSO10008
现在要判断,当PowerList里面存在KSO10004这个值的时候,输出:好
VBScript code:
<%
set rs=server.Creat ......