多个type="radio"的显示和隐藏问题,控制之后确认按钮无效
<tr><td class="value" width="85%">
满意度:
<div id="a12">
<input type="radio" id="bxResult" name="bxResult" value="0" checked="true" onclick="dispalyA3()"/>
<label >满意</label>
<input type="radio" id="bxResult" name="bxResult" value="1" onclick="dispalyA3()"/>
<label >一般</label>
<input type="radio" id="bxResult" name="bxResult" value="2" onclick="dispalyA3()"/>
<label >不满意</label>
</div>
<div id="a3" style="display:none;">
评价内容:<br>
<textarea id="bxEvaluation" name="bxEvaluation" rows="4" cols="50" datatype="s1-100" onkeydown='if(event.keyCode==13) return false'>${hnjkBxxtListPage.bxEvaluation}</textarea>
<span class="Validform_checktip">备注不能超过100位字符</span>
</div>
</td>
</tr>
</table>
</t:formvalid>
</body>
<script type="text/javascript">
var $ = function(id){return document.getElementById(id) || null};
function dispalyA3()
{
var divElem = $('a12');
var inp = divElem.getElementsByTagName('input');
var A3 = $('a3');
if (divElem != null)
{
if (inp.checked || inp.checked)
{
A3.style.display = 'block';
}
else{
A3.style.display = 'none';
}
}
}
</script>
页:
[1]