ÓÃAJAXʵÏÖgoogleÊäÈë×Ô¶¯Íê³ÉµÄ¼òµ¥Ä£Äâ(ת)
ÓÃAJAXʵÏÖgoogleÊäÈë×Ô¶¯Íê³ÉµÄ¼òµ¥Ä£Äâ
2009-03-02 13:00
±È½Ï¼òµ¥µÄÄ£Äâ,Îı¾¿òÊäÈëCompanyName,È»ºó
ËÑË÷SqlServer2000 ÀïNorthWindÊý¾Ý¿â Suppliers±íµÄCompanyName×Ö¶Î,
È»ºóʵÏÖ×Ô¶¯Íê³É
ËĸöÎļþ
1 .AutoComplete.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ÊäÈë×Ô¶¯Íê³É</title>
<script language="javascript">
//ÊäÈëÐÅÏ¢µÄÎı¾¿ò
var txtInput;
//ÏÂÀ±íµ±Ç°Ñ¡ÖÐÏîµÄË÷Òý
var currentIndex = -1;
//³õʼ»¯²ÎÊý,ºÍÏÂÀ±íλÖÃ
function initPar()
{
txtInput = document.getElementById("txtCompanyName");
//ÉèÖÃÏÂÀ±íÏà¶ÔÓÚ Îı¾ÊäÈë¿òµÄλÖÃ
setPosition();
}
//ÉèÖÃÏÂÀ±íÏà¶ÔÓÚ Îı¾ÊäÈë¿òµÄλÖÃ
function setPosition()
{
var width = txtInput.offsetWidth;
var left = getLength("offsetLeft");
Ïà¹ØÎĵµ£º
<html>
<body>
<script¡¡language="JavaScript">
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡var¡¡req¡¡=¡¡null;
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡function¡¡test()¡¡{
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡var¡¡province¡¡=¡¡document.all("province").value;
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡req¡¡=¡¡new¡¡ActiveXObject("Microsoft.XMLHTTP ......
µ÷Ó÷½·¨ÈçÏÂ:
var p = new Pager(5, 10);
p.init('Ò³ÂëËùÔÚµÄÈÝÆ÷ID', dataOp);
function dataOp() {
// ajaxÊý¾Ý²Ù×÷
SendContent("/Admin/TopicService.asmx/GetTopicList?currentPageIndex=" + p.currentPage + "&pageSize=" + p.pageSize, "GET", "", ajax ......
1. Êʵ±Ê¹ÓÃUpdatePanel
2. ÀûÓÃWebService·½·¨¶¯Ì¬Éú³ÉÓû§¿Ø¼þµÄÄÚÈÝ£¬±ÜÃâUpdatePanel»Ø´«Ôì³ÉµÄÐÔÄÜËðʧ£¨ViewState£©
3. ToolkitScriptManager´úÌæScriptManager
4. <asp:ScriptManager runat="server" ID="sm" ScriptMode="Release" EnablePartialRendering="false"
......
asp.net ajaxÖÐÎÄÂÒÂëµÄ½â¾ö£¿
2010-01-19 12:06
ÒÔǰûÔõô×ÐϸµÄÑо¿¹ýajax,Ö»ÊÇÓõ½Á˾ÍÖ±½ÓÄùýÀ´ÓÃ,·¢ÏÖÁËÎÊÌâÔÙÕÒ½â¾ö·½·¨.ÒÔÏÂÊÇÎÒÔÚÕÒ½â¾öÎÊÌâµÄ¹ý³ÌÖеÄÒ»µãССµÄ×ܽá.
Ò».̸AjaxµÄGetºÍPostµÄÇø±ð
Get·½Ê½:
ÓÃget·½Ê½¿É´«Ëͼòµ¥Êý¾Ý£¬µ«´óСһ°ãÏÞÖÆÔÚ1KBÏ£¬Êý¾Ý×·¼Óµ½urlÖз¢Ë ......
±ê×¼XMLHttpRequest²Ù×÷
abort()
Í£Ö¹µ±Ç°ÇëÇó
getAllResponseHeaders()
°ÑHTTPÇëÇóµÄËùÓÐÏìÓ¦Êײ¿×÷Ϊ¼ü/Öµ¶Ô·µ»Ø
getResponseHeader("header")
·µ»ØÖ¸¶¨Êײ¿µÄ´®Öµ
void open(string method, string url, boolean asynch)
½¨Á¢¶Ô·þÎñÆ÷µÄµ÷Óá£method²Î ......