select 两级联动

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/jsp/taglib.jsp" %>
<script type='text/javascript' src='/dwr/interface/expertView.js'></script>
<script type='text/javascript' src='/dwr/engine.js'></script>
<script type='text/javascript' src='/dwr/util.js'></script>
<script type="text/javascript" src="${htl }/common/scripts/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${htl }/fckeditor/fckeditor.js"></script>
<title>专家看点新增</title>
<script type="text/javascript">
function changeSelect()
{
var expertTypeId=document.getElementById("expertTypeId").value;
expertView.queryExpert(expertTypeId,returnData);
}
function returnData(data)
{
var obj=document.getElementById("expert");
if(data!=null)
{
obj.length=0;
obj.options[obj.length]=new Option('---请选择---','');
for(var i=0;i<data.length;i++)
{
obj.options[obj.length]=new Option(data[i]["expertName"],data[i]["expertId"]);
}
}
}
function addExpertView()
{
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>
<div id="maincontent">
<div id="mainc" class="da">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"><h4>专家看点新增</h4></td>
</tr>
</table>
<form name="form1" method="post" enctype="multipart/form-data">
<table width="598" border="0" cellpadding="0" cellspacing="0" class="formbiao" style="font-size:12px">
<s:hidden id="expertViewId" name="expertViewId" />
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">标题</span></td>
<td align="left">
<s:textfield id="title" name="zjxExpertview.title" />
</td>
</tr>
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">专家类型</span></td>
<td align="left">
<select id="expertTypeId" name="zjxExpertview.expertViewtypeid" οnchange="changeSelect()">
<option value="">---请选择---</option>
<s:iterator value="expertTypeList" id="list1" status="i">
<option value="<s:property value="#list1.expertTypeId"/>" ><s:property value="#list1.expertType"/></option>
</s:iterator>

</select>
</td>
</tr>
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">专家姓名</span></td>
<td align="left">
<select id="expert" name="zjxExpertview.expertId">
<option value="">---请选择---</option>
</select>
</td>
</tr>
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">是否最新</span></td>
<td align="left">
<input type="radio" name="zjxExpertview.isNew" checked value="0"/>否
<input type="radio" name="zjxExpertview.isNew" value="1"/>是
</td>
</tr>
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">是否置顶</span></td>
<td align="left">
<input type="radio" name="zjxExpertview.isTop" checked value="0"/>否
<input type="radio" name="zjxExpertview.isTop" value="1"/>是
</td>
</tr>
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">是否推荐</span></td>
<td align="left">
<input type="radio" name="zjxExpertview.isRecommend" checked value="0"/>否
<input type="radio" name="zjxExpertview.isRecommend" value="1"/>是
</td>
</tr>
<tr>
<td align="right" class="listbiaotd"><span class="lanbiaoti">专家看法</span></td>
<td align="left">
<textarea name="context" id="context" style="width:100%; height:200px;"></textarea>
<div align="left" >
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'context' ) ;
//oFCKeditor.BasePath = 'FCKeditor/' ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.Width = '100%' ;
oFCKeditor.Height = '400' ;
oFCKeditor.Value = '' ;
oFCKeditor.ReplaceTextarea();
//oFCKeditor.Create() ;
</script>
</div>
</td>
</tr>

<tr >
<td colspan="2" >
<input id="submitButton" name="submitButton" type="button" οnclick="addExpertView()" value="提交" />
<input type="button" value="返回列表" οnclick="window.location='<%=request.getContextPath() %>/expert!query.do'"/>
<input type="button" value="后退" οnclick="history.back();"/></td>
</tr>
</table>
</form>

</div>
</div>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值