input框 select复选和单选,树形菜单供选择

XML/HTML Code
- <div class="container">
- <div class="row">
- <div class="col-lg-6">
- <h3>Multi Selection</h3>
- <input type="text" id="justAnInputBox" placeholder="Select"/>
- </div>
- <div class="col-lg-6">
- <h3>Single Selection</h3>
- <input type="text" id="justAnotherInputBox" placeholder="Type to filter"/>
- </div>
- </div>
- </div>
JavaScript Code
- <script type="text/javascript">
- var SampleJSONData = [
- {
- id: 0,
- title: 'choice 1 '
- }, {
- id: 1,
- title: 'choice 2',
- subs: [
- {
- id: 10,
- title: 'choice 2 1'
- }, {
- id: 11,
- title: 'choice 2 2'
- }, {
- id: 12,
- title: 'choice 2 3'
- }
- ]
- }, {
- id: 2,
- title: 'choice 3'
- }, {
- id: 3,
- title: 'choice 4'
- }, {
- id: 4,
- title: 'choice 5'
- }, {
- id: 5,
- title: 'choice 6',
- subs: [
- {
- id: 50,
- title: 'choice 6 1'
- }, {
- id: 51,
- title: 'choice 6 2',
- subs: [
- {
- id: 510,
- title: 'choice 6 2 1'
- }, {
- id: 511,
- title: 'choice 6 2 2'
- }, {
- id: 512,
- title: 'choice 6 2 3'
- }
- ]
- }
- ]
- }, {
- id: 6,
- title: 'choice 7'
- }
- ];
- var comboTree1, comboTree2;
- jQuery(document).ready(function($) {
- comboTree1 = $('#justAnInputBox').comboTree({
- source : SampleJSONData,
- isMultiple: true
- });
- comboTree2 = $('#justAnotherInputBox').comboTree({
- source : SampleJSONData,
- isMultiple: false
- });
- });
- </script>
原文地址:http://www.freejs.net/article_biaodan_760.html
最近更新
- jQuery轮播图插件slider-...
- CSS3鼠标悬停图片遮罩层变形动画特...
- 响应式全屏手风琴菜单,同时支持垂直方...
- 分组select选择器,支持多选和单...
- jQuery时间日期选择器代码日历插...
- Select 选择器 可以清空的单选...
我爱薅羊毛
点击最多
广告赞助
相关文章
- 美化input radio select等输入框,...
- select 下拉框多选,用select代替che...
- jQuery下拉多选插件 下拉框复选 包括全选
- radio单选框彩色,自定义边框,圆点颜色和大小
- 自定义checkbox和radio样式 圆形方形...
- select下拉菜单带图片

