ajax Ó÷¨
AjaxPro.2.dll µÄʹÓÃʵÀý(2008-09-20 11:13:25)±êÇ©£ºajax it ·ÖÀࣺajax
×¼±¸¹¤×÷£ºÏîÄ¿ÖÐÒªÒýÓÃAjaxPro.2.dll£¬Õâ¸ö²½Öè¾ÍÊ¡ÂÔÁË£¬¹þ¹þ
µÚÒ»²½£ºweb.config
<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*,ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>
</system.web>
µÚ¶þ²½£ºÇ°Ì¨
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ÎÞ±êÌâÒ³</title>
<script type="text/javascript" language="javascript">
function addText()
{
var str = Maps.GetTestStr().value;
document.getElementById("Text1").value = str;
}
</script>
</head>
<body onload="addText();">
<form id="form1" runat="server">
<div>
<input id="Text1" type="text"/>
</div>
</form>
</body>
</html>
µÚÈý²½£ººǫ́
namespace AOFAXWEB
{
[AjaxPro.AjaxNamespace("Maps")]
public partial class bianliang : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(bianliang));
}
[AjaxPro.AjaxMethod]
&
Ïà¹ØÎĵµ£º
Ajax¿Ø¼þ½é紹
1. Accordion
¡¾¹¦ÄܸÅÊö¡¿Accordion¿ÉÒÔÈÃÄãÉè¼Æ¶à¸öpanel ²¢ÇÒÒ»´ÎÖ»ÏÔʾһ¸öPanel .ÔÚÒ³ÃæÉϵÄÏÔʾЧ¹û¾ÍÏñÊÇʹÓÃÁ˶à¸öCollapsiblePanelsÖ»²»¹ýÿһ´ÎÖ»Õ¹¿ªÆäÖÐÒ»¸öCollapsiblePanel.Accordion¿Ø¼þÄÚ²¿°üº¬ÁËÈô¸É¸öAccordionPane£¬Ã¿Ò»¸öAccordionPaneµÄtemplateÀï°üÀ¨Á˶ÔÆäHeaderºÍContentµÄ¶ ......
ʵÏÖ¹¦ÄÜ£ºµ¥»÷°´Å¥£¬½«´ÓÊý¾Ý¿â»ñÈ¡µÄÊý¾Ý·µ»Ø¸øÎı¾¿ò1(Ë¢ÐÂÎı¾¿ò1)£¬¶øÎı¾¿ò2²»Ë¢ÐÂ
Ò³Ãæ1£ºtest.html
<!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 ......
¹¤¾ß:myeclipse 6.5
jsonÖÐÎĹٷ½£ºhttp://www.json.org/json-zh.html
н¨ÏîÄ¿webs£¬ÔÚWebRootÏÂн¨Ä¿Â¼json
xmlµÄ½âÎö·½Ê½:
------------------------------------------------------------------
1.н¨NewFile.xml
<?xml version="1.0" encoding="UTF-8"?>
<userinfo>
  ......
jqueryÖÐÒѾ·â×°ÁËajaxµÄ¹ý³Ì£¬Ê¹ÓÃÆðÀ´ºÜ¼òµ¥£º
ͨ¹ýget·½Ê½Ìá½»£º
<html>
<head>
<title>ʵÏÖ·þÎñÆ÷ʱ¼äʵʱ±ä»¯</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
& ......