JSP取得

努力做个好程序员 努力做个好程序员 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
1、将select 标签中labelProperty值放到隐含域incomings.enterName

Html代码
<html:select property="incomings.enterId" onchange="writeEntername();" >
<option value="-1">==选择外地企业==</option>
<html:options collection="outsideEps" property="orgNo" labelProperty="orgName"/>
</html:select>
<html:hidden property="incomings.enterName"/>

2、调用js writeEntername();

Js代码
function writeEntername(){
// 得到下拉框的 labelProperty 的值
var select = document.incomingsForm['incomings.enterId'];
var option = select.options[select.selectedIndex];
incomingsForm['incomings.enterName'].value = option.innerText;
}

这个 property怎么在struts中命名啊!!!!不知道怎么用,高手指教
...全文
评论 5
收藏 已收藏
分享
返回顶部
努力做个好程序员
Web 开发 81,108 成员 341,721 内容