如图所示,当把鼠标移动到A上的时候,右边弹出第二级选项(如条件1,条件2),当把鼠标放到第二级选项上时,可以弹出第三级选项(如附加条件1,附加条件2等)。请问这样的效果仅用select标签可以实现么,或是要加上其他方面的技巧,希望有人能够帮忙解答,如果能够附上相应的代码就最好了。
1 回答
点解点解
TA贡献10条经验 获得超6个赞
{"errorDesc":"成功","data":[{"areaId":"440604","areaName":"禅城区","parentAreaId":"440600","ShortName":"禅城","LevelType":3,"AreaCode":"0757","Zipcode":"528000","Lng":"113.1228","Lat":"23.00842","PinYin":"Chancheng","AreaStatus":1},{"areaId":"440600","areaName":"佛山市","parentAreaId":"440000","ShortName":"佛山","LevelType":2,"AreaCode":"0757","Zipcode":"528000","Lng":"113.122717","Lat":"23.028762","PinYin":"Foshan","AreaStatus":1},{"areaId":"440000","areaName":"广东省","parentAreaId":"100000","ShortName":"广东","LevelType":1,"AreaCode":"","Zipcode":"","Lng":"113.280637","Lat":"23.125178","PinYin":"Guangdong","AreaStatus":1},{"areaId":"100000","areaName":"中国","parentAreaId":"0","ShortName":"中国","LevelType":0,"AreaCode":"","Zipcode":"","Lng":"116.3683244","Lat":"39.915085","PinYin":"China","AreaStatus":0}],"errorCode":1,"isError":0}
好比如地址联动加载对应数据的,数据返回格式为以上数据(返回自己所有需要的数据,数据归类自己写函数维护),像以上的数据,广东是中国的子级,佛山是广东的子级,禅城区是佛山的子级,它们相关联起来通过areaId和parentAreaId关联起来!所以这样的需求,数据库设计是关键,再者数据的归类函数的实现!
- 1 回答
- 0 关注
- 3729 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消