<!doctype html>
<
html
>
<
head
>
<
meta
charset
=
"UTF-8"
>
<
meta
name
=
"viewport"
content="
initial-scale
=
1
.0,
maximum-scale
=
1
.0,
user-scalable
=
no
">
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"themes/metro/easyui.css"
>
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"themes/mobile.css"
>
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"themes/icon.css"
>
<
script
type
=
"text/javascript"
src
=
"jquery.min.js"
>
</
script
>
<
script
type
=
"text/javascript"
src
=
"jquery.easyui.min.js"
>
</
script
>
</
head
>
<
body
>
<
h2
>jQuery EasyUI ComboTree </
h2
>
<
p
>Click the buttons </
p
>
<
div
class
=
"easyui-panel"
style=
"width: 100%; max-width: 400px;
padding: 30px 60px;">
<
div
style
=
"margin-bottom: 20px"
>
<
input
id
=
"combotreeID"
class
=
"easyui-combotree"
data-options="url: 'dataTree.json',
method: 'get',
label: 'Select folder/file:',
labelPosition: 'top'"
style
=
"width:100%"
>
</
div
>
</
div
>
<
div
style
=
"height:10px"
></
div
>
<
div
id
=
"resultDivID"
></
div
>
<
div
style
=
"margin:20px 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
>
<
script
type
=
"text/javascript"
>
/* Method to get value */
function getValue() {
var val = $('#combotreeID')
.combotree('getValue');
$('#resultDivID')
.html(val + " is set");
}
/* Method to set value */
function setValue() {
$('#combotreeID')
.combotree('setValue', '103');
}
/* Method to disable select button */
function disable() {
$('#combotreeID')
.combotree('disable');
}
/* Method to enable select button */
function enable() {
$('#combotreeID')
.combotree('enable');
}
</
script
>
</
body
>
</
html
>