所属分类:输入-选择框
只需添加
<div id="demo"></div>
引入js后使用下面方法调用
// fileIds 为 input 的name;tagData为后台传过来的json $.myMethod("#demo",tagData,"fileIds")
显示的数据?
[{"name":"存包柜视频1","id":64}, {"name":"存包柜视频2","id":65}, {"name":"测试图片1","id":5}, {"name":"泳池图片","id":6}, {"name":"测试","id":7}, {"name":"测试视频","id":8}, {"name":"视频2","id":10}, {"name":"竖直长图","id":11}, {"name":"垃圾箱","id":16}];
$.myMethod("#demo1",tagData1,"fileIds1") $.myMethod("#demo2",tagData2,"fileIds2") $.myMethod("#demo3",tagData3,"fileIds3")