Easyui中文培训文档Word格式.docx

上传人:b****4 文档编号:16488551 上传时间:2022-11-24 格式:DOCX 页数:68 大小:248.06KB
下载 相关 举报
Easyui中文培训文档Word格式.docx_第1页
第1页 / 共68页
Easyui中文培训文档Word格式.docx_第2页
第2页 / 共68页
Easyui中文培训文档Word格式.docx_第3页
第3页 / 共68页
Easyui中文培训文档Word格式.docx_第4页
第4页 / 共68页
Easyui中文培训文档Word格式.docx_第5页
第5页 / 共68页
点击查看更多>>
下载资源
资源描述

Easyui中文培训文档Word格式.docx

《Easyui中文培训文档Word格式.docx》由会员分享,可在线阅读,更多相关《Easyui中文培训文档Word格式.docx(68页珍藏版)》请在冰豆网上搜索。

Easyui中文培训文档Word格式.docx

12Tree(树)33

12.1实例33

12.2参数36

12.3事件37

12.4方法37

13Layout(布局)38

13.1实例38

13.2参数39

13.3方法39

14Datagrid(数据表)39

14.1实例39

14.2参数43

14.3Column参数44

14.4事件45

14.5方法46

1Accordion(可折叠标签)

1.1实例

1.1.1代码

<

html>

head>

metahttp-equiv="

Content-Type"

content="

text/html;

charset=UTF-8"

>

title>

jQueryEasyUI<

/title>

linkrel="

stylesheet"

type="

text/css"

href="

../themes/default/easyui.css"

../themes/icon.css"

scripttype="

text/javascript"

src="

../jquery-1.4.2.min.js"

/script>

../jquery.easyui.min.js"

$(function(){

$('

#aa'

).accordion({

width:

400,

height:

200,

fit:

false

});

});

/head>

body>

divid="

aa"

border="

true"

>

divtitle="

Title1"

icon="

icon-save"

style="

overflow:

auto;

padding:

10px;

"

h3style="

color:

#0099FF;

AccordionforjQuery<

/h3>

p>

AccordionisapartofeasyuiframeworkforjQuery.Itletsyoudefineyouraccordioncomponentonwebpagemoreeasily.<

/p>

/div>

Title2"

icon-reload"

selected="

padding:

content2<

Title3"

content3<

/body>

/html>

1.1.2效果图

1.1.3扩展

实例html代码中

此行也可写成

class="

easyui-accordion"

width:

300px;

height:

200px;

fit="

false"

,并且将js代码全部去掉,效果图是一样的。

1.2参数

1.2.1容器参数

参数名称

参数类型

描述

默认值

width

数字

可折叠标签的宽度。

auto

height

可折叠标签的高度。

fit

布尔

是否使可折叠标签自动缩放以适应父容器的大小,当为true时width和height参数将失效。

false

border

是否显示边界线。

true

1.2.2面板参数

可折叠标签面板继承自面板(panel),许多属性定义在<

div/>

标签里,下面的属性就是如此:

selected

设置可折叠标签中默认展开的标签页

2DateBox(日期框)

2.1实例

2.1.1代码

!

DOCTYPEhtmlPUBLIC"

-//W3C//DTDHTML4.01Transitional//EN"

"

http:

//www.w3.org/TR/html4/loose.dtd"

charset=gb2312"

script>

functiondisable(){

#dd'

).datebox('

disable'

);

}

functionenable(){

enable'

/*

将Date/String类型,解析为String类型.

传入String类型,则先解析为Date类型

不正确的Date,返回'

'

如果时间部分为0,则忽略,只返回日期部分.

*/

functionformatDate(v){

if(vinstanceofDate){

vary=v.getFullYear();

varm=v.getMonth()+1;

vard=v.getDate();

varh=v.getHours();

vari=v.getMinutes();

vars=v.getSeconds();

varms=v.getMilliseconds();

if(ms>

0)

returny+'

-'

+m+'

+d+'

'

+h+'

:

+i+'

+s

+'

.'

+ms;

if(h>

0||i>

0||s>

+s;

returny+'

+d;

}

return'

;

).datebox({

currentText:

今天'

closeText:

关闭'

disabled:

false,

required:

true,

missingMessage:

必填'

formatter:

formatDate

h1>

DateBox<

/h1>

divstyle="

margin-bottom:

ahref="

#"

onclick=

disable();

disable<

/a>

enable();

enable<

inputid="

dd"

/input>

2.1.2效果图

2.2参数

属性名

类型

currentText

字符串

为当前日期按钮显示的文本

Today

closeText

关闭按钮显示的文本

Close

disabled

如果为true则禁用输入框

required

定义输入框是否为必添

missingMessage

当输入框为空时提示的文本

必填

formatter

function

格式化日期的函数,这个函数以’date’为参数,并且返回一个字符串

——

parser

分析字符串的函数,这个函数以’date’为参数并返回一个日期

2.3事件

事件名

参数

onSelect

date

当选择一个日期时触发

2.4方法

方法名

destroy

none

销毁组件

disable

禁用输入框.

enable

启用输入框

3ComboBox(组合框)

3.1实例

3.1.1代码

functionloadData(){

$('

#cc'

).combobox({

url:

combobox_data.json'

//该文件内容在下面

valueField:

id'

textField:

text'

});

functionsetValue(){

).combobox('

setValue'

'

2'

functiongetValue(){

varval=$('

getValue'

alert(val);

functiondisable(){

functionenable(){

$(function(){

).combobox({

width:

150,

listWidth:

listHeight:

100,

//valuefield:

value'

//textField:

//url:

editable:

<

ComboBox<

onclick="

loadData()"

loadData<

setValue()"

setValue<

getValue()"

getValue<

disable()"

enable()"

span>

Options:

/span>

selectid="

cc"

name="

dept"

required="

optionvalue="

==请选择==<

/option>

0"

苹果<

1"

香蕉<

2"

鸭梨<

3"

西瓜<

4"

芒果<

/select>

combobox_data.json内容:

[{

id"

1,

text"

text1"

},{

2,

text2"

3,

text3"

selected"

4,

text4"

5,

text5"

}]

3.1.2效果图

3.2参数

组件的宽度

listWidth

下拉列表的宽度

null

listHeight

下拉列表的高度

valueField

基础数据值名称绑定到这个组合框

value

textField

基础数据的字段的名称绑定到这个组合框

text

editable

定义是否可以直接到文本域中键入文本

url

加载列表数据的远程URL

3.3事件

onLoadSuccess

当远程数据成功加载时触发

onLoadError

当远程数据加载失败时触发

record

当用户选择了一个列表项时触发

onChange

newValue,oldValue

当文本域字段的值改变时触发

3.4方法

select

选择下拉列表中的一项

setValue

param

设定指定值到文本域,参数可以是一个字符串,也可以是一个Javascript对象,如果是对象,必须包含两个属性各对应valueField和TextField属性。

getValue

获取字段值

reload

请求远程列表数据.

4Dialog(对话框)

4.1实例

4.1.1代码

$(function(){

).dialog({

title:

对话框'

collapsible:

true,

minimizable:

maximizable:

resizable:

true,

toolbar:

text:

Add'

iconCls:

icon-add'

handler:

function(){

alert('

add'

}

},'

{

Save'

icon-save'

save'

}],

buttons:

Ok'

icon-ok'

ok'

},{

Cancel'

$('

).dialog('

close'

}]

functionopen1(){

open'

functionclose1(){

Dialog<

open1()"

open1<

close1()"

close1<

5px;

width:

400px;

height:

200px;

dialogcontent.<

4.1.2效果图

4.2参数

title

对话框的标题文本

NewDialog

collapsible

定义是否显示可折叠按钮

minimizable

定义是否显示最小化按钮

maximizable

定义是否显示最大化按钮

resizable

定义对话框是否可编辑大小

toolbar

数组

对话框上的工具条,每个工具条包括:

text,

iconCls,

disabled,

handler

etc.

buttons

对话框底部的按钮,每个按钮包括:

4.3事件

Dialog的事件和窗口(Window)的事件相同。

4.4方法

Dialog的函数方法和窗口(Window)的相同。

5Messager(提示框)

5.1实例

5.1.1代码

functionshow1(){

$.messager.show({

MyTitle'

msg:

Messagewillbeclosed

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 国外设计风格

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1