我有两个字段计算总数,但是我有一个单选按钮对来确定公式中的变量。这里的单选按钮代码:单选按钮在JavaScript中更改变量
(Length <input type="text" size="5" name="estimate_pool_length"
onBlur="conv2inches(document.forms.mainform);" />) x
(Width <input type="text" name="estimate_pool_width" size="5"
onBlur="conv2inches(document.forms.mainform);" />)
下面的JavaScript已经工作更新:
<input type="radio" name="estimate_pool_shape" value="1" /> Angle
<input type="radio" name="estimate_pool_shape" value=".86392" /> Freeform
后,立即根据这些领域和脚本这个JavaScript,然后计算池的表面积字段,我只需要它使用的变量来设置字段值,以便根据单选按钮进行更改。
((mainform.estimate_pool_width.value)+(mainform.estimate_pool_length.value)*(mainform.estimate_pool_shape.value))bug出错 – dmanexe 2010-04-02 17:10:13