ÈçºÎÔÚ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
Ïà¹ØÎÊ´ð£º
<%if request.QueryString("start") <>"" then%>
<%if cint(start)>0 then%>
<a href="search.asp?q= <%=q%>&start= <%if request.Query ......
½¨ÁËÒ»¸öÕ¾µã£¬ÀïÃæÓÐ login.aspx. events.aspx µÈµÈ ÆäËûµÄÒ³Ãæ¡£
µ«ÊÇÎÒµ÷ÊÔ ÆäËûÒ³ÃæµÄʱºò£¬±Ä³öÀ´µÄ×ÜÊÇ login.aspx Ò³Ãæ¡£
¸Õѧasp ÇëÖ¸½Ì
ÄãÉèÖÃÆðʼҳÁË°É¡£¡£
¶÷ÔõôȡÏûÄØ£¿
Òªµ ......
ÏÖÔÚÕâÉç»á»ù±¾Éϲ»ÐèÒªASP³ÌÐòÔ±ÁË,Ò»ÃæÊÔ,¶¼Òª.NET»òÕßPHP,JSPµÄ,°¥,,,,ASPÕâô²»ÖµÇ®Âð,ѧϰASPÊǸö´íÎóÂð
ûɶ´íÎó Ò»¾ä»°£º¼¼¶à²»Ñ¹Éí
¿¿ASP¶¼»ì²»µ½·¹³ÔÁË ÔÎ ÔÎ
ÎÒµÄÒâ˼ÊǶàѧһÃż¼Êõûɶ´íÎó ......
aspÏÂÃ棬µ±Òª¸ù¾Ý²»Í¬µÄȨÏÞÏÔʾһЩ¹¦ÄÜ°´Å¥µÄ»°»áд³É
<%
if ȨÏÞ=1 then
%>
<input type="submit" name="Submit" value="Ìá½»" />
<%
end i ......