Comments (5)
area1.value=[0,2,0];这句仅仅是控制了省市县弹出时的位置,不影响input真实的value,所以初始化的时候还是需要额外设置好input的value值与其对应
from larea.
直接在input标签中写value值即可,如果数据源存在与value值匹配的字符串,则插件弹出后会自动调整到对应位置
from larea.
不好意思,我先前试过这样操作,但是没有效果,今天再试了下,还是没有:
这样没有效果。
from larea.
哦,不好意思,我忘记了,这个版本需要用实例化对象中的value去控制,比如:
var area1 = new LArea();
area1.init(...);
area1.value=[0,2,0];
则插件弹出的默认位置为,第一个省,第3个市,第1个区;具体的位置寻找我暂时没有封装,需要你自己去控制了
from larea.
非常感谢,我的js也不是很精通。
from larea.
Related Issues (20)
- 如何获取选中的值
- Uncaught TypeError: Cannot read property 'nodeType' of undefined
- 样式我需要自己修改,但是修改完之后,省市区的位置都对不上了
- 滑动时点击确定报错
- 在个别手机上的省市区的排列乱了的问题
- 如何在更改样式行高后,滑动的结束后能够停留在一行?
- 用commonjs写法怎么模块的导出呢?
- ios下第二次点击input触发失败 HOT 1
- 大神本人小鸟一只 妄图修改三级为二级屡屡碰壁还请指点!!!!急得一匹!!!
- android部分机型不能滑动huawei6,vivo Y67是什么原因 HOT 1
- 这个是必须三级,如果是二级,或是一级怎么办呢? HOT 1
- 能不能直接遍历后台传回来的数据 HOT 2
- Uncaught TypeError: Cannot read property 'querySelectorAll' of null at MobileArea.setGearTooth (LArea.js:278)
- 移动端触发不了,PC完全没问题。急,大神求解答啊
- 当我选择地址的时候点击下面的地址会有一个报错,导致页面 HOT 2
- 手机端调不起来啊?支持手机吗
- 性能问题
- 不支持点击事件 HOT 1
- 移动端呼出时会出现按键的情况
- 无限循环报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from larea.