zoukankan      html  css  js  c++  java
  • easyUI-combotree的本地数据导入

    一、页面内容:

    <div style="margin:10px 0">
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="getValue()">GetValue</a>
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="setValue()">SetValue</a>
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="disable()">Disable</a>
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="enable()">Enable</a>
    </div>
    <input id="cc" class="easyui-combotree" style="200px; ">

    二、JS

    $(function(){
    $('#cc').combotree('loadData', [{
      id: 1,
      text: 'Languages',
      children: [{
          id: 11,
          text: 'Java'
          },
          {
          id: 12,
          text: 'C++'
          }]
      },
      {
       id: 2,
       text: 'fruits',
       children: [{
            id: 21,
            text: 'appale'
            },
            {
            id: 22,
            text: 'orange'
            },
            {
            id: 23,
            text: 'banana'
            }]
        }
      ]);
    });
    function getValue(){
      var val = $('#cc').combotree('getValue');
      var text = $('#cc').combotree('getText');
      alert("val="+val+",text="+text);
    }
    function setValue(){
      $('#cc').combotree('setValue', '这是设定的值');
    }
    function disable(){
      $('#cc').combotree('disable');
    }
    function enable(){
    $('#cc').combotree('enable');
    }

     三、展示

  • 相关阅读:
    开发者看过来,哪个移动平台好赚钱?
    EGit下配置Github项目
    用户接口(UI)设计的 20 条原则
    要想工作效率高,我们到底需要多少睡眠?
    Android 读取<metadata>元素的数据
    Android实现推送方式解决方案
    余晟:做个懂产品的程序员
    Gson简要使用笔记
    编程从业五年的十四条经验,句句朴实
    程序员不是包身工
  • 原文地址:https://www.cnblogs.com/Lxiaojiang/p/6168808.html
Copyright © 2011-2022 走看看