我正面临一个微小的问题..单选按钮的onclick动作没有执行。我试着用onchange事件为好,但没有用的..onclick事件没有点击发射
<label><input type="radio" name="search_type" id="search_type" value="name" onchange="by_name()">Enter the Name </label>
<input name="tag" type="text" id="search" maxlength="30">
<label><input type="radio" name="search_type" id="search_type" value="all" onchange="all()">All</label>
并单击所有,
function all()
{
window.alert('hi');
}
你能帮助我用你的建议。(JS文件链接,以及)
尝试添加'onclick'标签。 'Onclick'应该在'radiobutton'上工作。处理事件后可能会写入函数。 – CnapoB
重复http://stackoverflow.com/questions/8838648/onchange-event-handler-for-radio-button-input-type-radio-doesnt-work-as-one – chandu
为什么要用相同的名称编号? –