<html:text property="chargeStatPersonnelInput"/>
<html:select property="chargeStatPersonnelSelect" onchange="ChargeStatJavaScript('chargeStatSelectOne');">
<html:option value="蓝猫">蓝猫</html:option>
</html:select>
<script language="javascript" type="text/javascript">
function ChargeStatJavaScript(chargeStatButton)
{
var selectOne = 'chargeStatSelectOne' ;
else if(chargeStatButton==selectOne)
{
document.all["chargeStatPersonnelInput"].value = document.all["chargeStatPersonnelSelect"].value
}
}
</script>
这样就可以实现在下拉菜单中选择哪个文本框里就出现哪个的值
document.all["对应的是text的property"].value = document.all["对应的是select的property"].value
黑色头发 http://heisetoufa.iteye.com