Script to enable/disable input elements?

前端 未结 5 1656
日久生厌
日久生厌 2020-12-18 18:29

I\'m wondering if it\'s possible for a script to enable/disable all input elements on the page with some sort of toggle button.

I googled it but didn\'t find anythin

5条回答
  •  忘掉有多难
    2020-12-18 18:57

    Something like this would work:

    var inputs=document.getElementsByTagName('input');
    for(i=0;i

提交回复
热议问题