1. <select style="width:195px" name="role" id="role" onfocus="this.defaultIndex=this.selectedIndex;" onchange="this.selectedIndex=this.defaultIndex;"> This approach makes the drop-down box look the same as usual. The only difference is that after you pull down and select, it won’t respond to you. It’s the same whether you select it or not. It just ignores the customer's choice. 2. Set the disabled attribute <select style="width:195px" name="role" id="role" disabled="disabled"> This looks more direct, and it feels like read-only, and you can’t click or pull down. The words inside will also turn gray. When the attribute is set to "disabled", the select value cannot be passed when the form is submitted. Remove the disabled attribute before submitting $("#role").removeAttr("disabled"); jquery adds the attribute $("#role").attr("disabled","disabled"); |
<<: Nginx reverse proxy learning example tutorial
>>: Five things a good user experience designer should do well (picture and text)
Adaptive layout is becoming more and more common i...
Table of contents - Preface - - JVM Class Loader ...
Correct answer Using useRouter : // router path: ...
This article shares the specific code of jQuery t...
Introducing the Geo module of Nginx The geo direc...
download Download address: https://redis.io/downl...
1. Application Scenarios Parent page a.jsp Subpage...
Preface In this article, we will use Docker to bu...
Installation Environment WIN10 VMware Workstation...
Table of contents Zabbix monitors Nginx Zabbix mo...
In rows, dark border colors can be defined indivi...
This article uses an example to illustrate the us...
Possible reasons: The main reason why Seata does ...
Preface When we write code, we occasionally encou...
Introduction When writing SQL today, I encountere...