首页 >

基于asp+ajax和数据库驱动的二级联动菜单【PHP】

后端开发|php教程基于asp+ajax和数据库驱动的二级联动菜单【PHP】
asp,ajax,二级联动菜单
后端开发-php教程
index.asp 页面代码
仿堆糖 源码,ubuntu 文件格式,python爬虫图片试题,php衣服,文章seo描述lzw
 

<%
set cmd = conn.execute("select bigclassid,bigclassname from bigclass")
tempid=cmd("bigclassid")
%>
<%
if not cmd.eof then
do while not cmd.eof
bigclassid= cmd("bigclassid")
bigclassname = cmd("bigclassname")
%>
<option value="">
<%
cmd.movenext
loop
end if
cmd.close
set cmd = nothing
%>

<%
set cxd = conn.execute("select * from smallclass where bigclassid=" & tempid)
if not cxd.eof then
do while not cxd.eof
smallclassid= cxd("smallclassid")
smallclassname = cxd("smallclassname")%>
<option value="">
<%
cxd.movenext
loop
cxd.close
set cxd = nothing
else
html = "暂无小类"
response.write html
end if
%>
ajax.js 代码
古风网站源码下载,ubuntu开机选择grub,爬虫在吗 分析网页,php 教育,seo业务平台lzw
 
// JavaScript Document
function createxmlhttp()
{
xmlhttpobj = false;
try{
xmlhttpobj = new XMLHttpRequest;
}catch(e){
try{
xmlhttpobj=new ActiveXObject("MSXML2.XMLHTTP");
}catch(e2){
try{
xmlhttpobj=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e3){
xmlhttpobj = false;
}
}
}
return xmlhttpobj;
}
function getsubcategory(bigclassid){
if(bigclassid==0){
document.getElementById("subclass").innerHTML="选择二级分类";
return;
};
var xmlhttpobj = createxmlhttp();
if(xmlhttpobj){//如果创建对象xmlhttpobj成功
xmlhttpobj.onreadystatechange=handle;
xmlhttpobj.open('get',"getsubcategory.asp?bigclassid="+bigclassid+"&number="+Math.random(),true);//get方法 加个随机数。
xmlhttpobj.send(null);
}
}
function handle(){//客户端监控函数
//if(xmlhttpobj.readystate==4){//服务器处理请求完成
if(xmlhttpobj.status==200){
//alert('ok');
var html = xmlhttpobj.responseText;//获得返回值
document.getElementById("subclass").innerHTML=html;
}else{
document.getElementById("subclass").innerHTML="对不起,您请求的页面有问题...";
}
//}
//else{
//document.getElementById("subclass").innerHTML=xmlhttpobj.readystate;//服务器处理中
//}
//}
}

getsubcategory.asp 代码

简单个人商城网站源码,vscode如何放大文字,ubuntu 搜狗修复,tomcat关闭所有日志,qt加sqlite3的库,app爬虫与反爬虫,php 判断表单提交,吉林正规seo优化方法,下载有特效的网站,pageadmin cms 网站模板修改lzw
 

<%
response.charset="gb2312"
bigclassid=safe(request.querystring("bigclassid"))
if bigclassid"" then
set re=new regexp
re.ignorecase=true
re.global=false
re.pattern = "^[0-9]{1,3}$"
if not re.test(bigclassid) then
response.write "非法参数"
response.end
end if%>

<%on error resume next
set p = conn.execute("select * from smallclass where bigclassid=" & bigclassid)
if err then
err.clear
response.write "查询出错"
response.end
end if
if not p.eof then
html = ""&vbnewline
do while not p.eof
html = html&""&p("smallclassname")&""&vbnewline
p.movenext
loop
html = html&""
else
html = "暂无小类"
end if
p.close
set p = nothing
conn.close
set conn = nothing
response.write html
html = ""
end if
%>


基于asp+ajax和数据库驱动的二级联动菜单【PHP】
  • javascript读取Xml文件做一个二级联动菜单示例【javascript】
  • javascript读取Xml文件做一个二级联动菜单示例【javascript】 | javascript读取Xml文件做一个二级联动菜单示例【javascript】 ...

    基于asp+ajax和数据库驱动的二级联动菜单【PHP】
  • php+mysql实现的二级联动菜单效果详解【PHP】
  • php+mysql实现的二级联动菜单效果详解【PHP】 | php+mysql实现的二级联动菜单效果详解【PHP】 ...

    基于asp+ajax和数据库驱动的二级联动菜单【PHP】
  • php怎么实现二级联动菜单
  • php怎么实现二级联动菜单 | php怎么实现二级联动菜单 ...