首页 > 代码库 > Jquery mobile 中在列表项上使用单选按钮
Jquery mobile 中在列表项上使用单选按钮
?
无意中发现可以在li上实现开关按钮
http://jsfiddle.net/Gajotres/pzfr2/
?
?
?
?
?
?
?
?
触类旁通,终于实现了在li上增加单选按钮组
?
- @model QGateMobile.Areas.WG32.Models.SystemConfigModel
- @{
- ????ViewBag.Title = "系统配置";
- }
- @section Header {
- ????@Html.ActionLink("后退", "Index", "Home", null, new { data_icon = "arrow-l", data_rel = "back" })
- ????<h1>@ViewBag.Title</h1>
- }
- ?
- <style type="text/css">
- ????#raido-container {
- ????????position: relative;
- ????????float: right;
- ????????margin-top: -10px !important;
- ????}
- ?
- ????????#raido-container .ui-slider {
- ????????????margin-top: -50px !important;
- ????????}
- </style>
- ?
- ?
- ?
- <p>
- ????在此完成系统配置
- </p>
- <ul data-role="listview" data-inset="true" style="list-style-type: none;">
- ????<li>@Ajax.ActionLink("数据库更新", "UpdateDB", "Home", new AjaxOptions())</li>
- </ul>
- <ul data-role="listview" data-inset="true" style="list-style-type: none;">
- ????<li data-role="list-divider">反潜回设置</li>
- ?
- ????<li data-role="fieldcontain">
- ????????<p>
- ????????????反潜(同一控制器上多门反潜)
- ????????</p>
- ????????<p>
- ????????????网段(同网段多控制器共享反潜)
- ????????</p>
- ????????<p>
- ????????????区域(同区域多控制器共享反潜)
- ????????</p>
- ????????@{
- ????????????string[] ss = new string[4];
- ????????????if (Model.AntiBack == 0)
- ????????????{
- ????????????????ss[0] = "checked=\"checked\"";
- ????????????}
- ????????????ss[Model.AntiBackBroadcast] = "checked=\"checked\"";
- ????????}
- ????????<div data-role="controlgroup" data-type="horizontal">
- ????????????<input type="radio" name="antiback" id="antibackRadio1" value="http://www.mamicode.com/0" @Html.Raw(ss[0]) />
- ????????????<label for="antibackRadio1">禁用</label>
- ????????????<input type="radio" name="antiback" id="antibackRadio2" value="http://www.mamicode.com/1" @Html.Raw(ss[1]) />
- ????????????<label for="antibackRadio2">反潜</label>
- ????????????<input type="radio" name="antiback" id="antibackRadio3" value="http://www.mamicode.com/2" @Html.Raw(ss[2]) />
- ????????????<label for="antibackRadio3">网段</label>
- ????????????<input type="radio" name="antiback" id="antibackRadio4" value="http://www.mamicode.com/3" @Html.Raw(ss[3]) />
- ????????????<label for="antibackRadio4">区域</label>
- ????????</div>
- ????????@*<input type="checkbox" data-role="flipswitch" name="anti" id="anti" checked="">*@
- ????</li>
- </ul>
- @Scripts.Render("~/bundles/anti")
?
?
?
Jquery mobile 中在列表项上使用单选按钮
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。