I tried to assign a new value into the hidden input and checkbox of an input form.
(我尝试将新值分配给输入表单的隐藏输入和复选框。)
It's working fine in Firefox but not in IE (I'm using IE 7).(它在Firefox中工作正常,但在IE中却没有(我使用的是IE 7)。)
Does anyone know what is wrong with my code?(有谁知道我的代码有什么问题?)
HTML:
(HTML:)
<input type="hidden" id="msg" name="msg" value="" style="display:none"/>
<input type="checkbox" name="sp" value="100" id="sp_100">
Javascript:
(使用Javascript:)
var Msg="abc";
document.getElementById('msg').value = Msg;
document.getElementById('sp_100').checked = true;
ask by Jin Yong translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…