請選擇省

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

無刷新三級聯(lián)動菜單從數(shù)據(jù)庫獲取數(shù)據(jù)(適用于fir

系統(tǒng) 2107 0
表單葉面
< script language ="javascript" src ="include/selectoption.js" ></ script >

< select name ="privceid" id ="privceid" onchange ="editnextselect(this,'cityid');" >
< option value ="-1" > 請選擇 </ option >
</ select >
< select name ="cityid" id ="cityid" onchange ="editnextselect(this,'county');" >
< option value ="-1" > 請選擇 </ option >
</ select >
< select name ="county" id ="county" >
< option value ="-1" > 請選擇 </ option >
</ select > 區(qū)/縣

< script language ="javascript" > ...
var privceid = " <%=privceid%> " ;
var cityid = " <%=cityid%> " ;
var county = " <%=county%> " ;
getdatelist(
' &pid= ' ,privceid, ' privceid ' );
if (cityid != "" ) ... {getdatelist( ' &pid= ' + privceid,cityid, ' cityid ' );}
if (county != "" ) ... {getdatelist( ' &pid= ' + cityid,county, ' county ' );}
function editnextselect(obj,nexselid) ... {
if (nexselid == ' cityid ' ) ... {
selvalue
= cityid;
}
else ... {
selvalue
= county;
}

var pid = obj.options[obj.selectedIndex].value;
if (pid != null ) ... {
getdatelist(
' &pid= ' + pid,selvalue,nexselid);
}

}

</ script >
js包含葉面
// JavaScriptDocument
function InitAjax() ... {
var ajax = false ;
try ... {ajax = new ActiveXObject( " Msxml2.XMLHTTP " );}
catch (e) ... {
try ... {ajax = new ActiveXObject( " Microsoft.XMLHTTP " );}
catch (E) ... {ajax = false ;}
}

if ( ! ajax && typeof XMLHttpRequest != ' undefined ' ) ... {ajax = new XMLHttpRequest();}
return ajax;
}

function datexml(url,value) ... {
var number = Math.random();
var url = url + " ?qaaq= " + number + value;
var ajax = InitAjax();
 ajax.open(
" GET " ,url, false );
 ajax.send(
null );
// ajax.onreadystatechange=function(){}
if (ajax.readyState == 4 && ajax.status == 200 ) ... { return ajax.responseText;}
}

function getdatelist(values,selvalues,SelectName) ... {
var getdate = datexml( " include/xmlgetp_c_c.asp " ,values);
if (getdate) ... {
if (getdate != " wrong " && getdate != " no " ) ... {
var objSelect = document.getElementById(SelectName);
objSelect.options.length
= 1 ;
var datearray = getdate.split( " $ " );
for (i = 0 ;i < datearray.length - 1 ;i ++ ) ... {
var op = window.document.createElement( " option " );
op.value
= datearray[i].split( " | " )[ 0 ];
op.innerHTML
= unescape(datearray[i].split( " | " )[ 1 ]);
objSelect.appendChild(op);
}

if (selvalues != "" ) ... {
for (i = 0 ;i < objSelect.options.length;i ++ ) ... {
if (objSelect.options[i].value == selvalues) ... {
objSelect.options[i].selected
= true ;
break ;
}

}

}

}

}

}

讀取數(shù)據(jù)庫葉面
< ! -- #includefile = " dbconn.asp " -->
< %
pid
= request.querystring( " pid " )
if pid <> "" then
if isnumeric (pid) = false then
response.write
" wrong "
end if
end if
if pid = "" then
sql
= " selectzipcode,zipnamefromZIPCODEINFOwhereparentzipisnull "
else
sql
= " selectzipcode,zipnamefromzipcodeinfowhereparentzip=' " & pid & " ' "
end if
call dbopen
set rs = conn.execute(sql)
if not rs.eof then
do while not rs.eof
response.writers(
" zipcode " ) & " | " & escape(rs( " zipname " )) & " $ "
rs.movenext
loop
else
response.write
" no "
end if
set rs = nothing
call dbclose
%
>

無刷新三級聯(lián)動菜單從數(shù)據(jù)庫獲取數(shù)據(jù)(適用于firefox和ie)


更多文章、技術交流、商務合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 精品欧美日韩一区二区三区 | 亚洲免费在线 | 成人不卡 | 日本一级毛片毛片一级毛片 | 四虎影院在线播放 | 五月婷婷亚洲综合 | 天天做天天爱天天影视综合 | 老头与老头同性tube可播放 | 中国一级免费毛片 | 一级国产视频 | 久久久影院亚洲精品 | 亚洲精品国产乱码在线播 | 久久久久久久久毛片精品 | 欧美精品在线观看 | 国产精品美女在线 | 精品福利一区二区三区免费视频 | 人人揉人人爽五月天视频 | 天天做天天添婷婷我也去 | 婷婷色在线播放 | 亚洲精品国产成人中文 | 日本中文在线播放 | 欧美洲久久日韩欧美 | 欧洲欧美成人免费大片 | 五月婷婷在线视频观看 | 一级毛片免费观看不卡的 | 目韩一区二区三区系列片丶 | 欧美不卡视频在线 | 成人爽a毛片在线视频网站 成人爽视频 | 成人免费久久精品国产片久久影院 | 久草香蕉视频在线观看 | 波多野结衣一区 | 中文字幕日韩精品亚洲七区 | 国产日韩欧美亚洲 | 真人毛片免费拍拍拍aa视频 | jiz中国| 久久精品中文字幕免费 | 国产欧美日韩精品专区 | 99视频网址| 久久精品视频久久 | 色一情一乱一乱91av | 狼人综合伊人 |