ajax repeater·ÖÒ³
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<mce:style type="text/css"><!--
.n{TEXT-DECORATION:none;cursor:pointer} a{color:black} a:hover{color:blue}
.m{TEXT-DECORATION:none;cursor:default} a{color:black}
--></mce:style><style type="text/css" mce_bogus="1"> .n{TEXT-DECORATION:none;cursor:pointer} a{color:black} a:hover{color:blue}
.m{TEXT-DECORATION:none;cursor:default} a{color:black}
</style>
<mce:script type="text/javascript"><!--
var xmlHttp = null;
var index, size = "10";
function $(id) {
return document.getElementById(id);
}
function createXMLHttpRequest() {
if (xmlHttp == null) {
if (window.XMLHttpRequest) {
//Mozilla ä¯ÀÀÆ÷
xmlHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
// IEä¯ÀÀÆ÷
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert('´´½¨Ê§°Ü');
}
}
}
}
}
function openAjax(para) {
if (xmlHttp == null) {
createXMLHttpRequest();
if (xmlHttp == null) {
alert('³ö´í');
return;
}
}
xmlHttp.open("post", "RepeaterDemo.aspx?date=" + new Date().getTime(), true);
xmlHttp.onreadystatechange = xmlHttpChange;
xmlHttp, s
Ïà¹ØÎĵµ£º
//==================>¡¾index.jsp¡¿===============================
<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<% String path=request.getContextPath(); %>
<%@page import="com.sinoest.dfrf.orm.pojo.Mainmenu"%>
<%@page import="com.si ......
Dojo1.3.x
µÄ
Ajax
ʾÀý
ÕûÀíÈË£º»Æ³Ï
QQ
Ⱥ£º
65643887
ÕâÆªÎÄÕÂÖ÷ÒªÊǰïÖú¶Ô
Dojo
¸ÐÐËȤµÄÅóÓÑÃÇ¿ì
ËÙʵÏÖÍøÕ¾ÉϵÄÀý×Ó¡£
http://sitepen.com/labs/guides/?guide=DojoQuickStart#Ajax
Ëü½Ì³Ì·ÖÁË
3
²¿·Ö£¬ÆäÖеÄÀý×Ó²»ÈÝÒ×
ÉÏÊÖ¡£ÎÒÕâÀïÌṩһ¸ö´ò°üÎļþ
AjaxWithDojo.war
ÏÂÃæÎÒ½«Ïêϸ˵Ã÷²Ù×÷²½Ö ......
var httpRequest = false;
var mesdivs = null
function sendRequest(url, mesdiv) {
mesdivs = mesdiv;
httpRequest = false;
if (window.XMLHttpRequest) {
httpRequest = new XMLHttpRequest();
......
1¡¢´´½¨
XMLHttpRequest
¶ÔÏóµÄÒ»¸öʵÀý
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if ( ......
1¡¢µ±¸Ä±ä·þÎñÆ÷ÉϵÄ״̬ʱӦµ±Ê¹ÓÃPOST·½·¨¡£²»Í¬ÓÚGET£¬ÐèÒªÉèÖÃXML- HttpRequest¶ÔÏóµÄContent-TypeÊײ¿£¬ÈçÏÂËùʾ£º
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ÓëGET²»Í¬£¬POST²»»áÏÞÖÆ·¢Ë͸ø·þÎñÆ÷µÄ¾»ºÉµÄ´óС£¬¶øÇÒPOSTÇëÇó²»Äܱ£Ö¤ÊÇÃݵȵġ£
Äã×öµÄ´ó¶àÊýÇëÇó¿ÉÄܶ¼ÊÇG ......