Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ajax ¶ÁÈ¡ .csv Îļþ

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>JavaScript Sample</title>
<link rel="stylesheet" type="text/css" href="main.css" media="all">
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="main.js"></script>
</head>
<body>
<h1>CSVÐÎʽ¤Î¥Çー¥¿¤ò読¤ß込¤ß±íʾ¤¹¤ë</h1>
<div id="tableData">¥Çー¥¿¤ò読¤ß込¤ßÖÐ....</div>
</body>
</html>
window.onload = function(){
var msec = (new Date()).getTime();
new Ajax.Request("data.csv", {
method: "get",
parameters: "cache="+msec,
onSuccess:function(httpObj){
var text = httpObj.responseText;
var LF = String.fromCharCode(10);
var tabText = text.split(LF);
var tbl = "<table border='1'>";
for (var i=0; i<tabText.length; i++){
var cText = tabText[i].split(",");
tbl += "<tr>";
for (var j=0; j<cText.length; j++){
tbl += "<td>"+cText[j]+"</td>";
}
tbl +="</tr>";
}
tbl += "</table>";
$("tableData").innerHTML = tbl;
},
onFailure:function(httpObj){
$("tableData").innerHTML = "¥¨¥éー¤Ç読¤ß込¤á¤Þ¤»¤ó¤Ç¤·¤¿";
}
});
}


Ïà¹ØÎĵµ£º

ASP.NET AJAX¿ò¼Ü±à³ÌÖ®JSONÐòÁл¯ÆÊÎö

ASP.NET AJAX(×î³õ´úÂëÃûΪ“ATLAS”)¿ò¼Ü£¬×÷ÎªÖØµãÖ§³ÖASP.NET¿ª·¢Æ½Ì¨µÄ¿ªÔ´Ajax¿ò¼ÜÔÚËüÒ»³öÊÀʱ¾ÍÊܵ½¹ã´ó.NET¿ª·¢ÈËÔ±µÄÇàíù¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«×¨×¢ÓÚ·ÖÎöASP.NET AJAX±à³ÌÖзþÎñÆ÷Óë¿Í»§¶ËͨÐŹý³ÌÖеÄÊý¾Ý´æ´¢ÐÎʽµÄÎÊÌâ¡£¾ßÌåµØËµ£¬ÎÒÃǽ«Ì½ÌÖÒ»¸öʵÏÖÐòÁл¯Óë·´ÐòÁл¯µÄ·þÎñÆ÷¶Ë¶ÔÏó—JavaScriptS ......

AjaxÑéÖ¤Óû§ÃûÊÇ·ñ´æÔÚ

<script language="javascript" type="text/javascript">
        var xmlHttp = null;
        function CreateXMLHttp()
        {
           ......

Ajax¶¨Ê±Ë¢ÐÂÒ³Ãæ

var xmlHttp;
var flag = false;
function createXMLHttpRequest()
{
  if(window.ActiveXObject)
  {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  else if(window.XMLHttpRequest)
  {
  xmlHttp=new XMLHttpRequest();
  }
}
fu ......

Java Web»ù´¡£ºµÚ¶þÊ®¶þ½² Ajax½»»¥¼òµ¥ÊµÀý

±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
ÏÂÃæÒÔ×¢²á¹ý³ÌÖÐÓû§ÃûÊÇ·ñ´æÔÚµÄÑé֤ΪÀý½éÉÜAJAXµÄÓ¦Óá£
¹¦ÄÜÃèÊö£ºÓû§×¢²áµÄÓû§Ãû²»ÔÊÐíÖØ¸´£¬ËùÒÔÔÚÓû§ÌύʱºòÐèÒªÅжϡ£ÎªÁËÈÃÓû§ÔçÖªµÀ½á¹û£¬ÔÚÓû§ÊäÈëÓû§ÃûÖ®ºó¾ÍÓ¦¸Ã½øÐÐÅжϣ¬¿ÉÒÔ²ÉÓÃAJAX½øÐд¦Àí¡£
¼ÙÉ裺ΪÁ˼ò»¯´ú ......

Java Web»ù´¡£ºµÚ¶þÊ®½² Ajax¸ÅÊö

±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
AJAXÊÇAsynchronous JavaScript and XMLµÄËõд£¬Éæ¼°JavaScript½Å±¾¡¢XHTMLºÍCSS¡¢DOM¡¢XMLºÍXSTLµÈ¼¼Êõ¡£
l         XHTMLÓëCSSʵÏÖÊý¾ÝÐÅÏ¢µÄͳһ»¯ºÍ±ê×¼»¯ÏÔʾ£»
l    & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ