Asp.net 如何将RadioButtonList转换为JQuery UI按钮列表?
我的表单上有一个ASP.NET RadioButton列表,我想将其转换为类似JQuery的按钮 我的简单代码:Asp.net 如何将RadioButtonList转换为JQuery UI按钮列表?,asp.net,jquery,radiobuttonlist,Asp.net,Jquery,Radiobuttonlist,我的表单上有一个ASP.NET RadioButton列表,我想将其转换为类似JQuery的按钮 我的简单代码: <asp:Label ID="lblOrderType" Text="Order Type" runat="server" CssClass="label" /> <asp:RadioButtonList ID="radOrderType" runat="server" RepeatDirection="Horizontal" CssClass="radioButt
<asp:Label ID="lblOrderType" Text="Order Type" runat="server" CssClass="label" />
<asp:RadioButtonList ID="radOrderType" runat="server" RepeatDirection="Horizontal" CssClass="radioButtonList">
<asp:ListItem value="M" Selected="True">Market</asp:ListItem>
<asp:ListItem value="L">Limit</asp:ListItem>
<asp:ListItem value="S">Stop</asp:ListItem>
</asp:RadioButtonList>
<asp:Button
ID="btnInsert"
runat="server"
Text="Insert"
onclick="btnInsert_Click" CssClass="button"
/>
我该怎么做呢?假设您已经获得了对jquery和jquery ui js文件的引用,请尝试将其添加到标记中:
<script type="text/javascript">
$(document).ready(function() { $("#<%= radOrderType.ClientID %>").buttonset(); });
</script>
$(document).ready(函数(){$(“#”).buttonset();});
另一个小问题-我在名为fvwEdit的FormView中有一个RadioButton列表。我已经尝试了$(document).ready(函数(){$(“#”).buttonset();})代码>但是我得到一个错误。有什么想法吗?
<script type="text/javascript">
$(document).ready(function() { $("#<%= radOrderType.ClientID %>").buttonset(); });
</script>