日期:2014-05-16  浏览次数:20584 次

用纯javascript写的异步调用js文件xmlcommon.js一

在页面调用方式:

1)<script language="javascript" src="<%=request.getContextPath()%>/js/xmlcommon.js"></script>

2)<select id="departmentCode" name="departmentCode" onchange="departmentCodeChange(this.value);">
???????????????????????? <jsp:include page="../common/tag_select_department.jsp">
???????????????????????????? <jsp:param name="hasOptioanal" value="1" />
???????????????????????? </jsp:include>
???????????????????? </select>

3)<script languge="javascript">
function departmentCodeChange(departmentCode){
?url = "calib0GetDecisionRule.do?departmentCode="+departmentCode;
?handlerRequestURLXML( url, setFields );
}
function setFields(request) {
?setElementList(request);
}

</script>