引入:
1 2 3 | < script src = "jquery/jquery-1.9.1.min.js" ></ script > < script src = "cityselect/cityselect.js" ></ script > < link href = "cityselect/cityLayout.css" type = "text/css" rel = "stylesheet" > |
创建html元素:
1 | < input name = "" id = "citySelect" type = "text" class = "city_input" readonly = "readonly" > |
加载完成后,调用如下方法,初始化插件:
1 | init_city_select($( "#citySelect" )); |