How to disable and enable HTML table using Javascript?

前端 未结 10 1314
醉梦人生
醉梦人生 2020-12-11 18:04

I want to know how can I disable and enable the highlighting on an HTML table using Javascript by clicking an html button.

Here are my codes:

tabletest.ht

10条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 18:13

    You can not disable a table. What do you want to achieve with this? The tables are read only anyway.

    If you have input tags in the table, you can disable those one by one.

    See also "Disabling" an HTML table with javascript

提交回复
热议问题