惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
I
InfoQ
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园_首页
罗磊的独立博客
V
V2EX
李成银的技术随笔
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
True Tiger Recordings
Vercel News
Vercel News
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
F
Fox-IT International blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
M
Microsoft Research Blog - Microsoft Research
Know Your Adversary
Know Your Adversary
爱范儿
爱范儿
The Register - Security
The Register - Security
G
Google Developers Blog
The Hacker News
The Hacker News
Malwarebytes
Malwarebytes
S
Securelist
博客园 - 三生石上(FineUI控件)
Jina AI
Jina AI
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
SegmentFault 最新的问题
博客园 - 叶小钗
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
博客园 - 聂微东
T
Threatpost
博客园 - 【当耐特】
D
Docker
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
G
GRAHAM CLULEY
V
Visual Studio Blog
C
Cisco Blogs
IT之家
IT之家
S
Security Archives - TechRepublic
Latest news
Latest news
阮一峰的网络日志
阮一峰的网络日志

qubeijun的博客

言语理解与表达 父亲往事-我儿子叫冬冬 公务员行测答题顺序及用时及答题技巧 判断推理 数量关系 冬甜夫妇5-10-5-21日本蜜月行程安排回归总结篇(无图片) 冬甜夫妇5.10-5.21日本蜜月行程安排计划篇 5.1 小贝壳疫苗计划 100DAYS 父亲往事-猴牤大爷的“帽子” 父亲往事-姨妈家的葡萄架 父亲往事-十五的月饼 父亲往事-姑妈的压岁钱 父亲往事-母亲的缝纫机父亲的锯 父亲往事-家属来队 父亲往事-新兵连的生活 父亲往事-村北的槐树林 父亲往事-小贝壳 公务员面试 系统架构设计师 图形推理 数学运算 父亲往事-惊蛰 资料分析 父亲往事-偷吃西红柿有绝窍 父亲往事-毯子衣服 父亲往事-水壶煮鸡蛋 父亲往事-煎饼蘸香油 系统架构设计师论文 软件设计师 父亲往事-大哥 资料分析-旧 基于grafana的监控部署 mysql数据库定时备份&运行日志定时清理 各种问题解决答案汇总 Alibaba Cloud Toolkit的使用说明 Angular简单入门 vue基础知识点总结 java正则表达式收集 java处理时间和日期api java常用的io,输入输出 java常见集合汇总 java调试代码不再用system.out.println(),用日志来调试程序 java常用工具类总结 java常用字符串操作总结 python之pymysql增删改查mysql数据库 词性标注集 python获取当前文件夹下的所有的文件名 mysql数据库操作总结 (翻译)Understanding LSTM Networks (翻译)Understanding Convolutional Neural Networks for NLP (翻译)传统和深度学习模型在文本分类中的应用综述与基准 小木虫论坛-学术科研互动平台爬虫 solr命令(持续更新) python json读写操作 python pip安装包镜像 python数字进度条 抓取维基百科分类索引下某一分类下的子分类及其分类下的页面(仅限词条) python3循环读取excel文件并写入json python3 requests动态网页post提交数据 python+selenium搜狗微信主页抓取 2017年5月25日 2017年5月18日 2017年5月17日 2017年5月15日 2017年5月16日 2017年5月14日 2017年5月13日 2017年5月12日 2017年5月11日 2017年5月10日 2017年5月9日 2017年5月8日 2017年5月7日 2017年5月6日 2017年5月5日 2017年5月4日 2017年5月3日 2017年5月2日 2017年5月1日 儿子的信-2013年7月9日 儿子的信-2013年7月8日 儿子的信-2011年11月26日 儿子的信-2010年8月16日 儿子的信-2010年1月2日
Dojo简单入门
2020-03-19 · via qubeijun的博客

发表于|更新于|前端

|总字数:1.2k|阅读时长:7分钟|浏览量:|

Dojo是一个用javascript语言实现的开源DHTML工具包。

以前从来没听过,PM说未来项目需要,所以就用一天时间大概过了一遍。中文教程确实非常少,找教程找了半天找到了一个,但对于小白来说入门是非常容易了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en" dir="ltr"></html>
<head>
<title>Dijit Template</title>
<link rel="stylesheet" href="dojo-release-1.16.2/dijit/themes/claro/claro.css" />
<link rel="stylesheet" href="dojo-release-1.16.2/dojox/form/resources/Rating.css" />
<style type="text/css">
body,
html {
font-family: helvetica, arial, sans-serif;
font-size: 90%;
}
</style>
</head>
<body class="claro">
<!-- HTML content here -->

<!-- 1、声明的方式使用dijit -->
<div dojoType="dijit._Calendar"></div>
<!-- 2、javascript使用dijit -->
<div id="myCalendar"></div>
<!-- 按钮 -->
<button id="myButton" dojoType="dijit.form.Button">Push Me</button>
<!-- 五星好评 -->
<div dojoType="dojox.form.Rating" numstars="5" value="3"></div>
<!-- 内容窗格 -->
<br />
<button dojoType="dijit.form.Button" id="myButton1">
Load content using XHR
</button>
<div dojoType="dijit.layout.ContentPane" id="myContentPane1">
<h1>Static content here!</h1>
</div>

<!-- 堆叠容器 -->
<div dojoType="dijit.layout.StackContainer" id="stackContainer">
<div dojoType="dijit.layout.ContentPane" title="Stack 1">
This is the content in stack 1.
</div>
<div dojoType="dijit.layout.ContentPane" title="Stack 2">
This is the content in stack 2.
</div>
</div>
<div dojoType="dijit.layout.StackController" containerId="stackContainer"></div>

<!-- 选项卡容器 -->
<div style="width: 535px; height: 290px">
<div dojoType="dijit.layout.TabContainer" style="width: 100%; height: 100%;">
<div dojoType="dijit.layout.ContentPane" title="Tab 1">
This is the content in tab 1.
</div>
<div dojoType="dijit.layout.ContentPane" title="Tab 2">
This is the content in tab 2.
</div>
</div>
</div>

<!-- 折叠容器 -->
<div style="width: 535px; height: 290px">
<div dojoType="dijit.layout.AccordionContainer" style="width: 100%; height: 100%;">
<div dojoType="dijit.layout.ContentPane" title="Blade 1">
This is the content in blade 1.
</div>
<div dojoType="dijit.layout.ContentPane" title="Blade 2">
This is the content in blade 2.
</div>
<div dojoType="dijit.layout.ContentPane" title="Blade 3">
This is the content in blade 3.
</div>
</div>
</div>

<!-- 边框容器布局 -->
<div style="width: 535px; height: 290px">
<div dojoType="dijit.layout.BorderContainer" style="width: 100%; height: 100%;">
<div dojoType="dijit.layout.ContentPane" region="top" splitter="true">
This is the content in the top section.
</div>
<div dojoType="dijit.layout.ContentPane" region="left" style="width: 100px;" splitter="true">
This is the content in the left section.
</div>
<div dojoType="dijit.layout.ContentPane" region="center" splitter="true">
This is the content in the center section.
</div>
<div dojoType="dijit.layout.ContentPane" region="right" style="width: 100px;" splitter="true">
This is the content in the right section.
</div>
<div dojoType="dijit.layout.ContentPane" region="bottom" splitter="true">
This is the content in the bottom section.
</div>
</div>
</div>
<!-- 1、嵌套组件 -->
<div dojoType="dijit.TitlePane" title="Color Picker">
<!-- 添加事件 -->
<div dojoType="dijit.ColorPalette" onChange="alert(this.value)">
<script type="dojo/method" event="onChange" args="evt">
alert(this.value);
</script>
</div>
</div>
<!-- 2、嵌套组件 -->
<div id="myTitlePane">
<div id="myColorPalette"></div>
</div>

<script src="dojo-release-1.16.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script>
dojo.require('dijit.dijit')
//Add Dijit components you are using here using dojo.require
dojo.require('dijit._Calendar')

dojo.require('dojox.form.Rating')

dojo.require('dijit.form.Button')
dojo.require('dijit.Dialog')

dojo.require('dijit.form.Button')
dojo.require('dijit.layout.ContentPane')

dojo.require('dijit.layout.StackContainer')
dojo.require('dijit.layout.StackController')
dojo.require('dijit.layout.ContentPane')

dojo.require('dijit.layout.TabContainer')
dojo.require('dijit.layout.ContentPane')

dojo.require('dijit.layout.AccordionContainer')
dojo.require('dijit.layout.ContentPane')

dojo.require('dijit.layout.BorderContainer')
dojo.require('dijit.layout.ContentPane')

dojo.require('dijit.TitlePane')
dojo.require('dijit.ColorPalette')

dojo.addOnLoad(function() {
//时间组件
var calendar = new dijit.Calendar({}, 'myCalendar')
//嵌套组件
var colorPalette = new dijit.ColorPalette(
{
//1、点击事件方法1
// onChange: function(evt) {
// alert(this.value)
// }
},
'myColorPalette'
)
//2、点击事件方法2
dojo.connect(colorPalette, 'onChange', null, function(evt) {
alert(this.value)
})
var titlePane = new dijit.TitlePane({ title: 'Color Picker' }, 'myTitlePane')
//JavaScript content here
//按钮组件
var button = dijit.byId('myButton')
dojo.connect(button, 'onClick', null, function(evt) {
var dialog = new dijit.Dialog({
content: 'You clicked the button!',
title: 'Message'
}).show()
})

//内容窗格
var button = dijit.byId('myButton1')
var contentPane = dijit.byId('myContentPane1')
dojo.connect(button, 'onClick', null, function(evt) {
contentPane.attr('href', 'content.html')
})
})
</script>
</body>
</html>

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 qubeijun的博客

赞助

  • 微信

    微信

  • 支付宝

    支付宝