我创建了两组代码。两者看起来都一样,但一个正在工作,一个没有。
http://jsfiddle.net/gDxqj/正在工作
工作意味着当您单击“其他”时,会打开一个新的文本字段。不工作意味着它没有。
有什么区别?
<div class="rButtons">
<input type="radio" name="numbers" value="10" onclick="uncheck();" />10
<input type="radio" name="numbers" value="20" onclick="uncheck();" />20
<input type="radio" name="numbers" value="other" onclick="check(this);"/>other
<input type="text" id="other_field" name="other_field" onblur="checktext(this);"/>
</div>