如何用JS实现选中单选按钮?如下列:
//单击提交按钮使其未选中单选按钮选中<scripttype="text/javascript">functionphoto(){//我这样写好像不对,请指正docume...
//单击提交按钮使其未选中单选按钮选中
<script type="text/javascript">
function photo(){
//我这样写好像不对,请指正
document.getElementById("photo1").checked==true;
}
</script>
---------------------------------------------------------------------
<input type="radio" id = "photo1" name = "photo" value="" />
<input type="submit" id="btnL" name="btn" onclick="photo();" value="提交" /> 展开
<script type="text/javascript">
function photo(){
//我这样写好像不对,请指正
document.getElementById("photo1").checked==true;
}
</script>
---------------------------------------------------------------------
<input type="radio" id = "photo1" name = "photo" value="" />
<input type="submit" id="btnL" name="btn" onclick="photo();" value="提交" /> 展开
1个回答
展开全部
<script type="text/javascript">
function cphoto(){
document.getElementById("photo1").checked=true;
}
</script>
---------------------------------------------------------------------
<input type="radio" id = "photo1" name = "photo" value="" />
<input type="button" id="btnL" name="btn" onclick="cphoto();" value="提交" />
function cphoto(){
document.getElementById("photo1").checked=true;
}
</script>
---------------------------------------------------------------------
<input type="radio" id = "photo1" name = "photo" value="" />
<input type="button" id="btnL" name="btn" onclick="cphoto();" value="提交" />
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询