//下拉列表的设定
function setSelect(formName,objName,objValue)
{
var objSel = document.forms(formName).elements(objName);
for (var i = 0; i < objSel.length; i++)
{
if (objSel.options(i).value == objValue)
{
objSel.options(i).selected = true;
break;
}
}
}
调用方法
<script language="javascript">setSelect("form1","fenl",'<bean:write name="law" property="fenl"/>')</script>