移动端联系人列表选择
调用js文件
<script src='libs/zepto.min.js' type="text/javascript"></script>
<script src="libs/script.js" type="text/javascript"></script>
调用css文件
<link rel="stylesheet" type="text/css" href="libs/zepto.css" />
存放的位置
<div id='list'></div>
// 调用:js $('#list').myList()数据:
js人物名称定义的位置
var provinces = {
"A": {
"安妮":["安妮","安娜"]
},
"B": {
"贝贝": ["贝贝"]
},
}
initList: function() {
var g = "";
for (let l in this.listBox) {
var f = this.listBox[l];
g += "<dl><dt id=" + l + ">" + l + "</dt>";
for (let i in f) {
g += "<dd data-link=" + l + ">" + i + "</dd>";
}
g += "</dl>";
}
this.$ele.html("<section>" + g + "</section>")
},