Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

radio button checked="checked" not working fine

  • 2 ответа
  • 3 имеют эту проблему
  • 3 просмотра
  • Последний ответ от cor-el

more options

i have two radio buttons

<input type="radio" name="scraplocation" id="radio1" value="port" checked="checked" onclick="showport();"> Port
                       	<input type="radio" name="scraplocation" id="radio2" value="door" onclick="showdoor();">Door

Here the first button will be in selected condition but when i want to select the second button it not working fine. i want to click twice or thrice to choose second radio button.
The problem vanishes if i choose i avoid checked="checked" in first radio button

i have two radio buttons <pre><nowiki><input type="radio" name="scraplocation" id="radio1" value="port" checked="checked" onclick="showport();"> Port <input type="radio" name="scraplocation" id="radio2" value="door" onclick="showdoor();">Door</nowiki></pre> Here the first button will be in selected condition but when i want to select the second button it not working fine. i want to click twice or thrice to choose second radio button.<br /> The problem vanishes if i choose i avoid checked="checked" in first radio button

Изменено cor-el

Все ответы (2)

more options

Hi there,

This support website is primarily intended for Firefox end users, not web developer questions. Upon first glance, it's hard to tell what might be going on with your code. Could there be something happening in the showdoor() function that triggers it to reset? You might want to try to strip out those onClick functions and see if it works then -- if it does, you'll want to closely debug the functions.

more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.