JavaScriptµ÷ÓÃdataTable²¢»ñÈ¡ÆäÖµ(ASP.Net,VS2005)
JavaScriptµ÷ÓÃdataTable²¢»ñÈ¡ÆäÖµ(ASP.Net,VS2005)
±¾¹¦ÄÜÖ÷ÒªÓõ½http://www.cnblogs.com/Hdsome/archive/2008/06/26/1230177.htmlÕâ¸öÐֵܵĴúÂ룬ÎÒÖ÷ÒªÊÇ×öÕûÀíºÍÀ©Õ¹¡£
Ê×ÏÈÔÚhttp://www.codeplex.com/AjaxPro/Release/ProjectReleases.aspx?ReleaseId=713ÍøÖ·ÏÂÔØ6.10.6.2_DLL.zip ѹËõ£¬ÔËÐÐÆäÖеÄAjaxProVSTemplate.vsi£¨±ØÐëÓÐVS2005»·¾³£©£¬È»ºó½«AjaxPro.2.dll¿½±´µ½binĿ¼ÏÂ
ÒÔÏÂÊÇÐèÒªÐ޸ĵĵط½£º
1¡¢ÐÞ¸Äweb.config
ÔÚsystem.web½ÚµãÏÂÌí¼Ó
<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
</httpHandlers>
2¡¢ÔÚ.NET·½·¨ÖÐÏò¿Í»§¶Ë×¢²ájavascript£¬ÓÃÒÔjavascriptʹÓÃ
namespace MyDemo
{
public class _Default
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default)); //_Default:´°ÌåÀàµÄÃû³Æ
}
[AjaxPro.AjaxMethod]
public DataTable GetDataTable ()
{
return ÈÎÒâÒ»¸ödatatable;
}
}
}
3¡¢ÔÚ¿Í»§¶ËÓÃjavascriptµ÷Ó÷þÎñÆ÷¶ËµÄ·½·¨£¬Óï·¨Ò²ºÜ¼òµ¥
//×Ô¶¨Òåjavascriptº¯Êý
function getGetDataTable ()
{
var dt=MyDemo._Default.GetDataTable (getServerTime_callback); // MyDemo._Default. //ÃüÃû¿Ø¼þ.´°ÌåÀàÃû³Æ
var rowCount=dt.Value.Rows.length; //»ñµÃÐÐÊý
var colCount=dt.Value.Columns.length; //»ñµÃÁÐÊý
var value=dt.Value.Rows[i].filedName; //»ñµÃdtÖÐÖ¸¶¨ÐÐÖ¸¶¨ÁУ¨filedName£©µÄÖµ
}
Ïà¹ØÎĵµ£º
Ò»¡¢¸ÅÊö
Marquee£ºHtmlÖйöÆÁ¿Ø¼þ£¬¿ÉÒÔʹ°üº¬Ôڴ˱ê¼ÇÖеÄÄÚÈݽøÐи÷¸ö·½Ïò£¬¸÷ÖÖËٶȵĹö¶¯£¬Òò´ËÔÚ²»¿¼ÂÇʹÓõÚÈý·½¿Ø¼þµÄÇ°ÌáÏ£¬¿¼ÂÇʹÓÃMarquee+xmlhttpÀ´ÊµÏÖ¶¨´Î¸üÐÂÒ³ÃæÖеĹö¶¯ÄÚÈÝ£¬´ËʵÏÖÔÚIE6.0¼°ÒÔÉÏ°æ±¾²âÊÔͨ¹ý£¬ÆäËûä¯ÀÀÆ÷ÔÝʱδ²âÊÔ¹ý¡£
MarqueeÖеÄonfinishʼþ£ºÔÚ¸øMarqueeÊôÐÔloop¸ ......
var myDate = new Date();
myDate.getYear(); //»ñÈ¡µ±Ç°Äê·Ý(2λ)
myDate.getFullYear(); //»ñÈ¡ÍêÕûµÄÄê·Ý(4λ,1970-????)
myDate.getMonth(); //»ñÈ¡µ±Ç°Ô·Ý(0-11,0´ú±í1 ......
µ÷ÓÃJavaScriptÎļþ
ÓÃ×÷µ¼º½À¸
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ......
һλASP.net³õѧÕßѧϰ¹ý³ÌÖÐÕûÀíµÄ±¸Íü¼£¬°üÀ¨“´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£¬Îª°´Å¥Ìí¼Ó¶Ô»°¿ò£¬É¾³ý±í¸ñÑ¡¶¨¼Ç¼£¬É¾³ý±í¸ñ¼Ç¼¾¯¸æ”µÈµÈ³£¼ûÎÊÌâµÄ½â¾ö·½·¨(ÍøÉÏ¿´µ½Í¦ºÃµÄ,¹²ÏíÒ»ÏÂ)¡£
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("<script>window.open
('*.aspx?id="+t ......
Cache ¼´¸ßËÙ»º´æ £¬ÎÒÏëºÜ¶àÈ˶ÔËûµÄµÚÒ»Ó¡ÏóÒ»¶¨ÏñÎÒÒ»Ñù£¬¸Ð¾õËûÒ»¶¨ÄÜÌá¸ßϵͳµÃÐÔÄܺÍÔËÐÐËٶȡ£µÄÈ·¡£NetÍƳöcacheµÄ³õÖÔȷʵÊÇÕâÑùµÄ¡£ÄÇôcacheÊÇÈçºÎÌá¸ßϵͳÐÔÄÜÓëÔËÐÐËÙ¶ÈÄØ£¿ÊDz»ÊÇÔÚÈκÎÇé¿öÏÂÓÃcache¶¼ÄÜÌá¸ßÐÔÄÜ£¿ÊDz»ÊÇcacheÓõÄÔ½¶à¾ÍÔ½ºÃÄØ£¿ÎÒÔÚ½üÆÚ¿ª·¢µÄÏîÄ¿ÖÐÓÐËùÌå»á£¬Ð´ÏÂÀ´µ±×÷×ܽáҲϣÍûÄܸú´ó¼Ò ......