我的图表仅显示data
。单击单选按钮2和3时,它未显示data1
和data 2
。
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
}
任何想法为什么它没有显示data1
和data2
,因为它只显示data
所有3
postback true,radiobuttons:
<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>
答案 0 :(得分:0)
看看这一行: ElseIf RadioButtonList1.SelectedItem.Value = 2然后 hidden10.Value =“data2”
也许2应该是3?