select 两级联动
<%@pagecontentType="text/html;charset=UTF-8"%>
<%@includefile="/common/jsp/taglib.jsp"%>
<scripttype='text/javascript'src='/dwr/interface/expertView.js'></script>
<scripttype='text/javascript'src='/dwr/engine.js'></script>
<scripttype='text/javascript'src='/dwr/util.js'></script>
<scripttype="text/javascript"src="${htl}/common/scripts/My97DatePicker/WdatePicker.js"></script>
<scripttype="text/javascript"src="${htl}/fckeditor/fckeditor.js"></script>
<title>专家看点新增</title>
<scripttype="text/javascript">
functionchangeSelect()
{
varexpertTypeId=document.getElementById("expertTypeId").value;
expertView.queryExpert(expertTypeId,returnData);
}
functionreturnData(data)
{
varobj=document.getElementById("expert");
if(data!=null)
{
obj.length=0;
obj.options[obj.length]=newOption('---请选择---','');
for(vari=0;i<data.length;i++)
{
obj.options[obj.length]=newOption(data[i]["expertName"],data[i]["expertId"]);
}
}
}
functionaddExpertView()
{
if(document.getElementById("expertTypeId").value==""){
alert("请选择专家类型");
return;
}
if(document.getElementById("expert").value==""){
alert("请输入专家姓名");
return;
}
document.form1.action="<%=request.getContextPath()%>/expertView!add.do";
document.form1.submit();
}
</script>
<divid="maincontent">
<divid="mainc"class="da">
<tablewidth="800"border="0"cellspacing="0"cellpadding="0">
<tr>
<tdheight="30"><h4>专家看点新增</h4></td>
</tr>
</table>
<formname="form1"method="post"enctype="multipart/form-data">
<tablewidth="598"border="0"cellpadding="0"cellspacing="0"class="formbiao"style="font-size:12px">
<s:hiddenid="expertViewId"name="expertViewId"/>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">标题</span></td>
<tdalign="left">
<s:textfieldid="title"name="zjxExpertview.title"/>
</td>
</tr>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">专家类型</span></td>
<tdalign="left">
<selectid="expertTypeId"name="zjxExpertview.expertViewtypeid"onchange="changeSelect()">
<optionvalue="">---请选择---</option>
<s:iteratorvalue="expertTypeList"id="list1"status="i">
<optionvalue="<s:propertyvalue="#list1.expertTypeId"/>"><s:propertyvalue="#list1.expertType"/></option>
</s:iterator>
</select>
</td>
</tr>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">专家姓名</span></td>
<tdalign="left">
<selectid="expert"name="zjxExpertview.expertId">
<optionvalue="">---请选择---</option>
</select>
</td>
</tr>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">是否最新</span></td>
<tdalign="left">
<inputtype="radio"name="zjxExpertview.isNew"checkedvalue="0"/>否
<inputtype="radio"name="zjxExpertview.isNew"value="1"/>是
</td>
</tr>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">是否置顶</span></td>
<tdalign="left">
<inputtype="radio"name="zjxExpertview.isTop"checkedvalue="0"/>否
<inputtype="radio"name="zjxExpertview.isTop"value="1"/>是
</td>
</tr>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">是否推荐</span></td>
<tdalign="left">
<inputtype="radio"name="zjxExpertview.isRecommend"checkedvalue="0"/>否
<inputtype="radio"name="zjxExpertview.isRecommend"value="1"/>是
</td>
</tr>
<tr>
<tdalign="right"class="listbiaotd"><spanclass="lanbiaoti">专家看法</span></td>
<tdalign="left">
<textareaname="context"id="context"style="width:100%;height:200px;"></textarea>
<divalign="left">
<scripttype="text/javascript">
varoFCKeditor=newFCKeditor('context');
//oFCKeditor.BasePath='FCKeditor/';
oFCKeditor.ToolbarSet='Default';
oFCKeditor.Width='100%';
oFCKeditor.Height='400';
oFCKeditor.Value='';
oFCKeditor.ReplaceTextarea();
//oFCKeditor.Create();
</script>
</div>
</td>
</tr>
<tr>
<tdcolspan="2">
<inputid="submitButton"name="submitButton"type="button"onclick="addExpertView()"value="提交"/>
<inputtype="button"value="返回列表"onclick="window.location='<%=request.getContextPath()%>/expert!query.do'"/>
<inputtype="button"value="后退"onclick="history.back();"/></td>
</tr>
</table>
</form>
</div>
</div>