我哪里错了? [英] where I am going wrong?
本文介绍了我哪里错了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个下拉列表和两个文本框(一个是可见的,两个不是)当将下拉列表更改为在两者之间选项时,我必须显示两个文本框,另一个文本框将被隐藏
There are one dropdown list and two textboxes(one is visible and two are not)On change of dropdown list to "In Between" option I have to show the two text boxes and the other textbox will be hidden
<script src="/Scripts/jquery.jqGrid.js" type="text/javascript"></script>
<script src="~/Scripts/grid.locale-en.js" type="text/javascript"></script>
<link href="../../Content/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<link href="../../Content/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function() {
if ($("#dropDownRange").val() == 'In Between')
$("#hideme").show();
else
$("#hideme").hide();
});
</script>
<h2>
Reports</h2>
@using (Html.BeginForm("Report", "Report", FormMethod.Post))
{
<table style="font-size: small" width="100%">
<tr>
<td class="labels" align="center">
Select Range:
<select id="dropDownRange" name="dropDownRange" class="wpdodropdown" style="font-size: small;margin-right: 10px;">
<option>Equals</option>
<option>Greater Than</option>
<option>Less Than</option>
<option>In Between</option>
</select>
<td width="auto" align="left">Date:
<input type="text" name="Date" />
</td>
</tr>
<tr class="hideme">
<td width="auto" align="center"> From:
<input type="text" name="FromDate" />
</td>
<td width="auto" align="center">To:
<input type="text" name="ToDate" />
</td>
</table>
推荐答案
(function(){
if(
(function() { if (
(#dropDownRange)。val()=='In Between')
("#dropDownRange").val() == 'In Between')
(#hideme)。节目();
else
("#hideme").show(); else
这篇关于我哪里错了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文