在struts中如何使单选按钮默认选中某项?
<html:radio property="radioVal" value="radioVal.man" />男
<html:radio property="radioVal" value="radioVal.woman"/>女
解决方案1:简单选中
在</html>的最后加上(就是说当页面执行完时)
即<script>
document.all("radioVal")[1].checked=true;//第二个radio选中
</script>
</html>
隐藏
function display(id){
var traget=document.getElementById(id);
if(traget.style.display=="none"){
traget.style.display="";
}else{
traget.style.display="none";
}
}
























