function trans() { var intInputValue,intOutputValue,tempValue; intInputValue=document.transform.source_num.value; tempValue=intInputValue/document.transform.target.options[document.transform.target.selectedIndex].value; intOutputValue=tempValue*document.transform.source.options[document.transform.source.selectedIndex].value; intOutputValue=Math.round(intOutputValue*100)/100; document.transform.target_num.value=intOutputValue; if(document.transform.target_num.value=="NaN"){ document.transform.source_num.value=0; } setTimeout("trans()",100); } document.write('
'); document.write('仅供参考