Select is not optional in IE

Source: Internet
Author: User

Because jquery is recently used, JS is written in the jquery format.

 

Code

1 <select name = "drpadaddress" id = "drpadaddress">
2 <option value = "0"> select </option>
3 <option value = "0" Disabled = "true"> homepage </option>
4 <option value = "4"> | --- homepage header </option>
5 <option value = "6" >|--- homepage left </option>
6 <option value = "7"> | --- Right of the homepage </option>
7 <option value = "0" Disabled = "true"> List page </option>
8 <option value = "9" >|--- left of the List </option>
9 <option value = "0" Disabled = "true"> news page </option>
10 <option value = "0" Disabled = "true"> Print the product page </option>
11 <option value = "19" >|--- printing </option>
12 <option value = "20" >|--- print header </option>
13 <option value = "0" Disabled = "true"> consumables page </option>
14 <option value = "22"> | --- ad on the consumables page </option>
15 <option value = "23"> | --- ad list on the consumables page </option>
16
17 </SELECT>
18
19
20 <SCRIPT type = "text/JavaScript">
21 $ (document). Ready (function (){
22 window. cache = 0;
23 $ ('# drpadaddress'). BIND ('change', function (e ){
24 var opt = $ ('# drpadaddress option: selected ');
25 if (OPT. ATTR ('Disabled ')){
26 This. value = Window. cache;
27} else {
28 window. cache = This. value;
29}
30 });
31 $ ('# drpadaddress option?disabled='0000.css ('color', 'graytext ');
32
33
34 })
35
36 </SCRIPT>

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.