Ajax¿çÓòÇëÇóÌáʾ¾Ü¾ø·ÃÎÊ£¿£¿£¿ - Web ¿ª·¢ / Ajax
C# code:
<script type="text/javascript">
var xmlHttp;
function showJ()
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return
}
var url="http://www.ueepay.com/testConnect.ashx"
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.status==200)
{
var data=xmlHttp.responseText;
alert(data);
if(data=="OK")
{
alert("dnal");
}
}
}
function GetXmlHttpObject()
{
var xmlhttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlhttp;
}
</script>
Â¥ÉÏÊÇΪºÃÈË
Ïà¹ØÎÊ´ð£º
ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
ÎÒÓÃjqueryÎÞË¢ÐÂÉÏ´«Í¼Æ¬ºó·µ»Øjson¸ñʽµÄÊý¾Ý±¨´í
£¨Êµ¼ÊÉÏͼƬÊÇÉÏ´«³É¹¦µÄÁË£¬Ö»ÊÇ·µ»Øjson¸ñʽ×ܶÁ²»µ½£¬×ÜÊDZ¨´í£©
ÎÒµ÷ÊÔÉÏ´«µÄashxÒ³ÈçÏÂ
ÎÞ·¨ÏÔʾ XML Ò³¡£
ʹÓà Ñùʽ±íÎÞ·¨²é¿´ XML ÊäÈë¡£Çë¸ü ......
Ä¿Ç°Ò»¸öÏîÄ¿£¬Óöµ½¸ö´óÎÊÌ⣬Ҫ¸ãÒ»¸öµç×ÓµØͼ£¬Ð¡µÜ´ÓÀ´Ã»¸ã¹ýgis·½ÃæµÄ¶«Î÷£¬Õâ´ÎÓ²×ÅͷƤÉÏÁË¡£ ÏÂÃæÊÇÄ¿Ç°Óöµ½µÄ¸öÎÊÌâ¡£¡£¡£
OpenLayerÔõôÏòºǫ́·¢ËÍajaxÇëÇ󣨺ǫ́ÊÇSSH¿ò¼Ü£©£¬ÔÚÉêÇëµ½ºǫ́µÄactionºó£¬²é ......
Êý¾Ý¿âÒѾ·ÅÁ˶àÌõ¼Ç¼£¬¼ì²âµÄ¶¼ÊÇÓ¢Îĵģ¬¿ÉÊÇÓÐЩÓû§Ãû¿ÉÒÔÕý³£¼ì²â³öÒѱ»×¢²áÁË£¬ÓÐЩÓû§ÃûÊý¾Ý¿âÖÐȷʵ´æÔڵĵ«¾ÍÊǼì²â²»³öÒÑ´æÔÚ£¨ÔÚ×¢²áÒ³Ã滹ÊÇÏÔʾδ±»×¢²á£©£¬±ÈÈçÊý¾Ý¿âÖÐÓÐ Ò»¸öÓû§ÃûΪ£ºlb Î񱒵 ......