0

我的图表只显示data. 它没有显示data1,并且data 2单击单选按钮 2 和 3 时。

VB代码:

  If RadioButtonList1.SelectedItem.Value = 1 Then
        ' hidden10.Value = "data"


    ElseIf RadioButtonList1.SelectedItem.Value = 2 Then
        hidden10.Value = "data1"


    ElseIf RadioButtonList1.SelectedItem.Value = 3 Then
        hidden10.Value = "data2"


      function draw(d) {

           var testarray = JSON.parse(a);
           var testarray1 = JSON.parse(a1);
           var testarray2 = JSON.parse(a2);

javascript代码:

           var Yaxis = $("#<%=hidden10.ClientID%>").val();


        if (d == 1) {

               var title = Yaxis
                var title = Yaxis
           }


         else if (d == 3) 
           {

               var e = testarray1
               var title = Yaxis

           }
         else if (d == 2) {

               var title = Yaxis
               var title = Yaxis
           }

知道为什么它不显示data1and data2,因为它只显示data所有 3

回发真,单选按钮:

 <asp:Label ID="Label2" runat="server" CssClass="span-third-small">Select Units:</asp:Label>
            <asp:RadioButtonList RepeatDirection="Horizontal" CssClass="radioList" ID="RadioButtonList1"
                AutoPostBack="true" runat="server" RepeatLayout="Flow">
                <asp:ListItem Selected="True" Value="1">data</asp:ListItem>
                <asp:ListItem Value="2">data1</asp:ListItem>
                <asp:ListItem Value="3">data2</asp:ListItem>
            </asp:RadioButtonList>
4

1 回答 1

0

看这一行: ElseIf RadioButtonList1.SelectedItem.Value = 2 Then hidden10.Value = "data2"

也许2应该是3?

于 2013-08-01T15:11:32.473 回答