struts标签应用

1.select下拉框标签

<s:select list="#{'1':'干渠大断面','2':'直开口','3':'支渠分水口'}" label=" " name=""

              id="sttype" headerKey="" headerValue="--请选择--" ></s:select>

通过js设置默认选中项:

  Var sttype=document.getElementById(“sttype”);

  sttype.selectedIndex=1;

posted @ 2017-03-04 20:32  子衿悠悠  Views(125)  Comments(0Edit  收藏  举报