|
|
|
ขอโค้ด ตัวอย่างให้ ajax อ่านข้อมูล Mysql แล้วนำมาแสดง |
|
|
|
|
|
|
|
Code (JavaScript)
var url = 'AjaxPHPListRecord2.php';
var pmeters = 'mySort='+Sort;
HttPRequest.open('POST',url,true);
HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
HttPRequest.setRequestHeader("Content-length", pmeters.length);
HttPRequest.setRequestHeader("Connection", "close");
HttPRequest.send(pmeters);
Go to : Ajax List Record (PHP+MySQL and ASP+Access)
|
|
|
|
|
Date :
2012-01-06 06:47:40 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อันนี้แบบ RealTime ครับ
Code (JavaScript)
<script language="JavaScript">
function bodyOnload()
{
doCallAjax('CustomerID')
setTimeout("doLoop();",2000);
}
function doLoop()
{
bodyOnload();
}
</script>
Go to : Ajax Realtime (PHP+MySQL and ASP+Access)
|
|
|
|
|
Date :
2012-01-06 06:48:47 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|