style.display=‘none’ doesnt work on option tags in Chrome, IE

We cannot set a style, display:none on OPTION TAG in Chrome and IE, It can be done in Firefox !

Kinda Solutions :

1. Use disabled attribute for the OPTION

2. If you want to remove them permanently, use removeChild to delete the option.

3. If you want them to show/hide, then u might have to save the removed options into a javascript variable.

2 comments:

  1. As of Chrome v71, display:none works but it is still accesible as default option and through the keyboard, so you have another option which is using both display:none and the disabled attribute

    ReplyDelete
    Replies
    1. You used to host 50-50 gop addict games? Add rsn: general name thx!

      Delete

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...