城市选择插件使用方法:
<!-- 引入css和js -->
1 2 | < link rel = "stylesheet" href = "cityselect/cityselect.css" > < script type = "text/javascript" src = "cityselect/cityselect.js" ></ script > |
<!-- 在输入框加入id -->
1 | < input type = "text" class = "cityinput" id = "citySelect" placeholder = "请输入目的地" > |
<!--JS创建实例,传入输入框id-->
1 2 3 | <script type= "text/javascript" > var test= new Vcity.CitySelector({input: 'citySelect' }); </script> |
"附有demo,使用简便"
老哥 为什么将你这个插件放在中间 点击后 页面会跳到头部 找不到哪里冒泡了
老哥 放在页面中间点击 页面会跳到顶部