当前位置: 首页 > 工具软件 > formSelects > 使用案例 >

html表单下拉菜单多选,formSelects 4.x多选下拉框

鲜于凯康
2023-12-01

需先引入:

formSelects-v4.css

formSelects-v4.js

插件下载地址:https://fly.layui.com/extend/formSelects

使用:

北京

上海

天津

重庆

获取

layui.use(['form', 'layer', 'jquery', 'table', 'laydate', 'element', 'upload', 'flow'], function () {

var $$ = layui.jquery;

var form = layui.form,

layer = parent.layer == undefined ? layui.layer : parent.layer,

//layer = layui.layer,

table = layui.table,

laydate = layui.laydate,

element = layui.element,

upload = layui.upload,

flow = layui.flow;

form.render();

form.on('submit(btn_submit)', function (obj) {

var getName = JSON.stringify(layui.formSelects.value('select_base_cityname', 'name'));//取值name数组

/*layer.msg("你选择的值为:" + getName, { offset: '150px', icon: 1, time: 5000 }, function () {

});*/

layer.msg("你选择的值为:" + getName);

});

});

 类似资料: