上面写错了
if(document.inputform.color_f]i].value=="<?=$array[font_color]?>") {document.all.color_f[i].checked=true;}
-->
if(document.inputform.color_f[i].value=="<?=$array[font_color]?>") {document.all.color_f[i].checked=true;}
if(document.inputform.color_f]i].value=="<?=$array[font_color]?>") {document.all.color_f[i].checked=true;}
-->
if(document.inputform.color_f[i].value=="<?=$array[font_color]?>") {document.all.color_f[i].checked=true;}
但是却选种了相应的单选框,为什么会出错呢?
应该为
i<document.inputform.color_f.length
谢谢~
想问一下用for(element in document.inputform.color_f)……next
怎么实现呢,
<script>
<!--
document.inputform.face.value=<?=$array[face]?>;
for(element in document.inputform.color_f())
{
if(element.value=="<?=$array[font_color]?>") {element.checked=true;}
}
//-->
</script>
具体有哪些元素
for(element in document.inputform.color_f)
{
alert(element + " = "+eval(document.inputform.color_f+"."+element));
}
……上面的代码没有测试
帮帮我,!