如何在提交后返回禁用下拉字段的值? [英] How can I return the value of disabled drop-down field after submit?

查看:45
本文介绍了如何在提交后返回禁用下拉字段的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个下拉字段,如果选择了任何项目,它将被禁用,之后我提交表单,但然后(提交后)下拉字段没有任何值,我想要提交后的值,但我的下拉字段为空。

I have a drop down field that if any items of it selected, it would be disabled, after that I submit the form, but then (after submitting) the drop down field doesn't have any value, I want to have a value after submit but my drop down field is empty.

感谢您的帮助,
(对不起我的英文)

Thanks for any help, (sorry for my English)

你好。我的问题仍然存在,但无论如何,谢谢;更清楚地说我的代码是:

Hi again. My problem still remains but thanks anyway; to make it more clear there is my code:

code:  <tr>
  <td class="tbl_entry_form_title"><%=DTask.LU_TECHNICIAN_TITLE%> :</td>
 <td class="tbl_entry_form_input">
<c:if test="${isTechnicianAdmin eq false}">
<c:forEach var="current" items="${technicianTitleItems}">
 <c:if test="${current.value eq taskBadrItem.lu_technician_title}">
<input name="lu_technician_title" value="${current.value}" onclick=" 
 <c:if test="${salesCustomerResult > 0}">alert('something')</c:if> 
 "/></c:if>
 </c:forEach></c:if><c:if test="${isTechnicianAdmin eq true}">
 <select name="lu_technician_title" class="select_box" onclick=" <c:if 


  test="${salesCustomerResult > 0}">alert('something')</c:if> ">
 <c:forEach var="current" items="${technicianTitleItems}"><option 
 value="<c:out value="${current.value}" />"<c:if test="${current.value 
 eq taskBadrItem.lu_technician_title}"> selected="selected"
 </c:if>>


 <c:out value="${current.title}"/></option></c:forEach></select>
</c:if></td> </tr>  


推荐答案

假设你使用javascript来禁用下拉菜单,你可以将所选值复制到隐藏字段,以便以

assuming that you use javascript to disable the dropdown, you can copy the selected value to a hidden field so it will be submitted with the form

这篇关于如何在提交后返回禁用下拉字段的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆