如何使用jQuery选择JSF组件?
<input type="checkbox" id="check2"></input><h:outputText value="Check the box, if your permanent address is as same as current address."> </h:outputText> <h:message for="checkbox" style="color:red" />
$("#check2").change(function() {
if ($("#check2").is(":checked")) {
$("#p2").hide();
} else {
$("#p2").show();
}});<p:selectManyCheckbox > <f:selectItem itemLabel="1" value="one" id="rad" ></f:selectItem></p:selectManyCheckbox>
$("#rad").change(function() {
if ($("#rad:checked").val() == "one") {
$("#p2").hide();
} else {
$("#p2").show();
} });