第一步:3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
后台添加三个数据表字段3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
字段名:pro 字段标识:省 输入表单替换html代码: 3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
字段名:city 字段标识:市 输入表单替换html代码:3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
字段名:area 字段标识:县 输入表单替换html代码:3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
第二步:3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
建立完毕后,在到 管理系统模型 修改生成相应的表单!3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
三个字段设为 提交项 可添加 修改 列表显示 结合项3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
第三步:3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
打开e/admin/AddNews.php3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
把以下代码粘贴到 结尾的随便位置即可3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var s = selects;3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//获取对象3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var p = document.getElementsByName('pro')[0];//省3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var c = document.getElementsByName('city')[0];//市3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var a = document.getElementsByName('area')[0];//区3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//绑定数据3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.bind(p,province);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.bind(c,city);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.bind(a,area);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//确定从属关系3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.parent(p,c);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.parent(c,a);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//设置默认值3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.selected(p,{value:'<?=$ecmsfirstpost==1?"":htmlspecialchars(stripSlashes($r[pro]))?>'});3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.selected(c,{value:'<?=$ecmsfirstpost==1?"":htmlspecialchars(stripSlashes($r[city]))?>'});3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.selected(a,{value:'<?=$ecmsfirstpost==1?"":htmlspecialchars(stripSlashes($r[area]))?>'});3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
第四步:3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
下载附件两个JS上传到e/admin/ JS为UTF-8编码,其他请自己转码3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
到此后台已经实现添加内容三级联动3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
在前台显示位置添加一下代码可筛选查3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客var s = selects;3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//获取对象3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var p = document.getElementsByName('pro')[0];//省3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var c = document.getElementsByName('city')[0];//市3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
var a = document.getElementsByName('area')[0];//区3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//绑定数据3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.bind(p,province);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.bind(c,city);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.bind(a,area);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//确定从属关系3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.parent(p,c);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.parent(c,a);3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
//设置默认值3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.selected(p,{value:'<?=$ecmsfirstpost==1?"":htmlspecialchars(stripSlashes($r[pro]))?>'});3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.selected(c,{value:'<?=$ecmsfirstpost==1?"":htmlspecialchars(stripSlashes($r[city]))?>'});3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
s.selected(a,{value:'<?=$ecmsfirstpost==1?"":htmlspecialchars(stripSlashes($r[area]))?>'});3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
注意两个JS路径3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客
住:四个默认字段mid是模型ID,classid是栏目ID,tempid是列表所使用的模板标签ID,ph是结合项,ph参数是必须等于1的,表示使用结合项,否则不能筛选3x9丁合超的个人博客 - 分享网络技术和网络热点的互联网科技博客