1、js代码:
function init() {
document.getElementById("studyPhase").disabled=true;
}
2、h:selectOneMenu下拉框
<h:selectOneMenu id="studyPhase" value="#{schoolfellowInfoEdit.studyPhase}" >
<f:selectItems value="#{schoolfellowInfoEdit.studyPhaseNamesItems}"/>
</h:selectOneMenu>