Home > Web Front-end > Layui Tutorial > Layui implements a method to dynamically disable select drop-down

Layui implements a method to dynamically disable select drop-down

王林
Release: 2020-11-25 16:09:37
forward
3723 people have browsed it

Layui implements a method to dynamically disable select drop-down

The specific implementation code is as follows:

(Learning video sharing: javascript video tutorial)

Front-end code

js code

// 禁止select点击
        function disSelect()
        {
            var level = $('#is_level1').val();
            if(level != 1){
                layer.msg('一级分类父级不可修改');
                $('select').attr('disabled', 'disabled');
                form.render('select');
            }
        }
        // 禁止select点击
        disSelect();
Copy after login

Related recommendations: layui

The above is the detailed content of Layui implements a method to dynamically disable select drop-down. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template