select

<select class="messtype" @change="type_fn()" id="s1">
    <option v-for="item in types" :value="item.label">{{item.text}}</option>
</select>

$("#s2").val();   如果沒有加:value      值就是item.text
                          加了:value   值就是item.label

2.字符串拼接

console.log($("[name=2015]")) 把2015換成變量
console.log($(`[name=${qq}]`));
console.log($("[name="+qq+"]"));
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章