vue中得到input的值

原生 js 使用 getElementById 比较麻烦的地方javascript 须要为元素设置 id 设置 id 以后,没法复用,由于一个页面中不能存在两个相同的 id 双向绑定 v-model 分两种状况css input 默认为空。这种状况使用 v-model 最方便,经过 this.inputName 便可获取到对应的值。 input 有默认值。即,设置了 value 属性的 Input
相关文章
相关标签/搜索