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

Nov 25, 2020 pm 04:09 PM
layui select

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!

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to get form data in layui How to get form data in layui Apr 04, 2024 am 03:39 AM

How to get form data in layui

How to set up jump on layui login page How to set up jump on layui login page Apr 04, 2024 am 03:12 AM

How to set up jump on layui login page

How layui implements self-adaptation How layui implements self-adaptation Apr 26, 2024 am 03:00 AM

How layui implements self-adaptation

Which one is better, layui or elementui? Which one is better, layui or elementui? Apr 04, 2024 am 04:15 AM

Which one is better, layui or elementui?

How to run layui How to run layui Apr 04, 2024 am 03:42 AM

How to run layui

What language is layui framework? What language is layui framework? Apr 04, 2024 am 04:39 AM

What language is layui framework?

The difference between layui framework and vue framework The difference between layui framework and vue framework Apr 26, 2024 am 01:27 AM

The difference between layui framework and vue framework

What is the difference between layui and vue? What is the difference between layui and vue? Apr 04, 2024 am 03:54 AM

What is the difference between layui and vue?

See all articles