【发布时间】:2014-02-14 07:24:42
【问题描述】:
我使用 cal() 创建了一个表单,但我无法使其与无线电输入一起使用。 它与 select 和 option 一起使用,但现在没有取值。
这里是代码
<script>
function cal()
{
var pl=document.form1.template.value;
var resultat=pl;
document.form1.tresultat.value=resultat;
document.formfin.tresultatfin.value = calfin();
}
</script>
<form name="form1">
<label for="Template">Option 1 : Template</label>
<ul>
<li id="template"><label for="logo+texte">Logo et texte</label>
<input type="radio" id="test" name="template" value="500" onclick="cal()"></li>
<li><label for="base">Base</label>
<input type="radio" id="test" name="template" value="800" onclick="cal()"></li>
<li><label for="perso">Sur-Mesure</label>
<input type="radio" id="test" name="template" value="2900" onclick="cal()"></li></ul>
<input type="text" value="0" name="tresultat">
</form>
任何想法在选择时获取文本输入中的值? 谢谢
【问题讨论】:
标签: javascript input radio cal