A typical Developer Blog
by Gordon Franke
Icon

Wie kann ich alle Checkboxen auf einer Internetseite mit Javascript deaktivieren?

1
2
3
4
5
6
7
8
inputs = document.getElementsByTagName('input');
for(i=0; inputs.length > i;i++)
{
  if(inputs[i].type == 'checkbox')
  {
    inputs[i].checked= false;
  }
}

No related posts.

Ähnliche Artikel bereitgestellt von Yet Another Related Posts Plugin.

Author:

Category: javascript, Uncategorized

Tagged: ,

3 Responses

  1. Code would be better like this
    for(var i=0, var inputLength = inputs.length; inputLength > i;i++)

    Dominik Jungowski’s last blog post..Don’t use NOW() in MySQL SELECT Queries

  2. Ofer sagt:

    Hi, there are many DHTML suites to use, why do you still write js on your pages?

  3. thanks for your comment. that’s right it is more a small code for the firebug console thats work on every page ;)

Leave a Reply

CommentLuv badge