[JavaScript]×ÔÒÑдµÄÒ»¸öAJAXÇëÇó£¢À࣢
¡¡¡¡ºÜ¶àÈ˶¼ÓùýAJAX¿Ø¼þ°É£¬AJAX¿Ø¼þ²»ÐèҪˢÐÂÒ³Ãæ¾Í¿ÉÒÔµ½ºǫ́ȥ¶Á³öÊý¾Ýµ½¿Í»§¶Ë£®AJAX¿Ø¼þ³ýÁËÓкÜìŵÄÌØÐ§Í⣬ÆäÒª¹¦ÄܾÍÊDz»ÐèҪˢÐÂÕû¸öÒ³Ãæ¾Í¿ÉÒÔÈ¡µÃÓû§ËùÐèÒªµÄÊý¾Ý£¬ÎÒ°ÑÕâÒ»¿éµÄµÄ¹¦ÄÜ·â×°³ÉÒ»¸öÀ࣬·½±ãÈÕºó¿ÉÒÔÖØ¸´Ê¹Ó㬴úÂëÈçÏ£º
//Ajax Request Class Start
function AJAXRequestClass()
{
var adapter;
AJAXRequestClass.prototype.Send=function(par1,par2){return false;}
//SetLoadingEvent:Then server return value must handle this event.
AJAXRequestClass.prototype.SetLoadingEvent=function(FunctionName){if(FunctionName)
{AJAXRequestClass.prototype.DataHandler=FunctionName;return true;}else{return false;}}
AJAXRequestClass.prototype.ErrMessage="";
AJAXRequestClass.prototype.Status=0;
function tmpType()
{
tmpType.prototype.TEXT=0;
tmpType.prototype.XML=1;
tmpType.prototype.STREAM=2;
}
AJAXRequestClass.prototype.Type=new tmpType();
if(window.XMLHttpRequest)
{
adapter=new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
try
{
adapter=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
adapter=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(oc)
{
adapter=null
}
}
&nbs
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐĿǰ¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×î¶¥¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×î¶¥¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
·½·¨Ò»£º
Js_file01.js
========
//³ÌÐò´úÂë
document.write(" <script language=\"javascript\" src="\/com\/ Js_file02.js \" > <\/script>");
·½·¨¶þ£º
html´úÂë
³ÌÐò´úÂë
<html>
<body>
<input type="button" value="ok" onclick="ja ......
http://www.longboo.com/
·ÖÒ³
http://www.longboo.com/Samples/linb/widgets/TreeGrid.Paging/index.html
Êý¾Ý¿â²éѯ¹¤¾ß
http://www.longboo.com/Samples/comb/OrderManagement/index.html
email¹¤¾ß
http://www.longboo.com/Samples/comb/OutLook/index.html
Íøµê
http://www.longboo.com/Samples/linb/Template ......
ÎÒ½ñÌìѧϰÁËÙ¡ÀÏʦ½²µÄJavaScript½âÎöDomÎĵµµÄ֪ʶ£º
Ò»¡¢ ½Úµã·ÖΪ3ÖÖÀàÐÍ£¬ÔªËؽڵ㣬ÊôÐԽڵ㣬Îı¾½Úµã
¶þ¡¢ ²éÕҽڵ㣺
l js´úÂë²»ÄÜдÔÚbodyÔªËØµÄÇ°Ãæ£¬js ´úÂëдÔÚ <head> ½ ......
JavaScript×÷ÓÃС½á£º
1 ´´½¨½Å±¾¿é
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script>
2 Òþ²Ø½Å±¾´úÂë
1: <script language=”JavaScript”>
2: <!--
3: document.write(“ ......