Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 每当我选择了一个月时,我会自动更新id为month_no和quarter的文本框,该月号正在更新,但quarter不在';T_C#_Jquery_Html_Css - Fatal编程技术网

C# 每当我选择了一个月时,我会自动更新id为month_no和quarter的文本框,该月号正在更新,但quarter不在';T

C# 每当我选择了一个月时,我会自动更新id为month_no和quarter的文本框,该月号正在更新,但quarter不在';T,c#,jquery,html,css,C#,Jquery,Html,Css,如何自动更新季度文本框中的值,如选择月份时,在文本框中自动更新月号和季度。我有两个文本框,月号正在更新,但季度号没有 jQuery(function($) { $("#month").change(function() { var selectedvalue=$(this).val(); $("#month_no").val($(this) .find("option:selected").

如何自动更新季度文本框中的值,如选择月份时,在文本框中自动更新月号和季度。我有两个文本框,月号正在更新,但季度号没有

    jQuery(function($) {
        $("#month").change(function() {
            var selectedvalue=$(this).val();

            $("#month_no").val($(this)
                .find("option:selected").attr("value"))
            if(selectedvalue=="january" || selectedvalue=="Febraury" || selectedvalue=="March") {
                $("#quarter").val("q1");
            }
        });
    });
<asp:Label runat="server">Month</asp:Label>
            <asp:DropDownList runat="server" Width="200px" CssClass="form-control" ID="month" OnTextChanged="change">
            <asp:ListItem Text="January" Value="January" Enabled="true"></asp:ListItem>
            <asp:ListItem Text="Febraury" Value="Febraury" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="March" Value="March" Enabled="true"></asp:ListItem>
            <asp:ListItem Text="April" Value="April" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="May" Value="May" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="June" Value="June" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="July" Value="July" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="August" Value="August" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="September" Value="September" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="October" Value="October" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="November" Value="November" Enabled="true" Selected="False"></asp:ListItem>
            <asp:ListItem Text="December" Value="December" Enabled="true" Selected="False"></asp:ListItem>
        </asp:DropDownList>
<asp:Label runat="server">Month NO</asp:Label>
            <asp:TextBox runat="server" CssClass="form-control" Width="200px" ID="month_no"
<asp:Label runat="server">quarter</asp:Label>
            <asp:TextBox runat="server" CssClass="form-control" Width="200px" ID="quarter"


<script>
jQuery(函数($){
$(“#月”).更改(函数(){
var selectedvalue=$(this.val();
$(“#月号”).val($(本)
.find(“选项:选定”).attr(“值”))
如果(selectedvalue==“一月”| | selectedvalue==“二月”| | selectedvalue==“三月”){
美元(“季度”).val(“第一季度”);
}
});
});
月
月号

请包括你的html代码给我们看html。你不需要一个;在.find(“option:selected”).attr(“value”)包含我的html代码之后。请包含你的html代码显示html;在.find(“option:selected”).attr(“value”)包含我的html代码之后。