日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

詳解php+ajax開發(fā)的注意事項(xiàng)(3)_PHP教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:解析用PHP操作MySql數(shù)據(jù)庫
?php /* *mysql數(shù)據(jù)庫分頁類 *@packagepagelist *@authoryytcpt(無影) *@version2008-03-27 *@copyrigthhttp://www.d5s.cn/ */ /* *分頁樣式 .page{float:left;font:11pxArial,Helvetica,sans-serif;padding:6px0;margin:0px10%;margin-top:10px;} .pagea,.pa


function sendRequest(strurl) { 

httpRequest = false;


if (window.XMLHttpRequest) { // Mozilla, Safari, ...

httpRequest = new XMLHttpRequest(); 

} else if (window.ActiveXObject) { // IE

try {

httpRequest = new ActiveXObject("Msxml2.XMLHTTP");

} catch (e) {

try {

httpRequest = new ActiveXObject("Microsoft.XMLHTTP");

} catch (e) {}

}

}

if (!httpRequest) { 

window.alert("通訊失敗");

return false;

}

httpRequest.onreadystatechange = processRequest; 

httpRequest.open("GET", strurl, true);

httpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");

httpRequest.send(null);

}>}

function asychronouscheck(strparam){ 

if(strparam.value.length == 0){ 

document.getElementById("state3").innerHTML="新帳號(hào)不能為空"; 



var strurl="checknewaccount.php?name="+encodeURIComponent(strparam.value); 

sendRequest(strurl); 

<BR pre=""> 

function asychronouscheck(strparam){ 

if(strparam.value.length == 0){

document.getElementById("state3").innerHTML="新帳號(hào)不能為空"; 

}

var strurl="checknewaccount.php?name="+encodeURIComponent(strparam.value); 

sendRequest(strurl);
表單部分

<dl> 

<dt>新帳號(hào)</dt> 

<dd><label id="state3"></label></dd> 

<dd><input type="text" name="nusername" id="nusername" size="26" maxlength="14" onblur="asychronouscheck(this)" /></dd> 

</dl> 

<dl>

<dt>新帳號(hào)</dt>

<dd><label id="state3"></label></dd>

<dd><input type="text" name="nusername" id="nusername" size="26" maxlength="14" onblur="asychronouscheck(this)" /></dd>

</dl> 

分享:解析用PHP操作MySql數(shù)據(jù)庫(DB類)
?php /* *mysql數(shù)據(jù)庫DB類 *@packagedb *@authoryytcpt(無影) *@version2008-03-27 *@copyrigthhttp://www.d5s.cn/ */ classdb{ varconnection_id=; varpconnect=0; varshutdown_queries=array(); varqueries=array(); varquery_id=; varquery_count=0; v

來源:模板無憂//所屬分類:PHP教程/更新時(shí)間:2010-02-16
相關(guān)PHP教程