-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
398 lines (260 loc) · 10.2 KB
/
index.html
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title> [ Lemon Ray ]</title>
<!-- stylesheets list from config.yml -->
<link rel="stylesheet" href="/css/iLiKE.css">
<!-- <script src="//cdn1.lncld.net/static/js/3.1.1/av-min.js"></script>
<script id="leancloud">
AV.init({
appId: "6E5zTbTljdUbVW2WkXPsXGJk-gzGzoHsz",
appKey: "0vsyDKfNpeSECAI70J794ugv"
});
</script> -->
<meta name="generator" content="Hexo 4.2.1"><link rel="alternate" href="/atom.xml" title="Lemon Ray" type="application/atom+xml">
</head>
<body>
<div class="header">
<div class="container">
<div class="menu">
<div class="menu-left">
<a href="/">
<img src="/favicon.svg"></img>
</a>
</div>
<div class="menu-right">
<a href="/">首页</a>
<a href="/archives">归档</a>
</div>
</div>
</div>
</div>
<div class="container">
<div class="article">
<div class="article-item">
<h2 class="article-item-header">
<a href="/2020/10/29/客户端与服务器端交互处理/">
客户端与服务器端交互处理
</a>
</h2>
<div class="article-item-content">
<p>客户端与服务器端交互处理
面试题:当用户在地址栏输入网址,到最后看到页面,都经历了什么?
1. URL地址解析
A:URI/URL/URN
URI 统一资源标识符URL 统一资源定位符URN 统一资源名称
B:一个完整URI的组成部分和实际意义
协议:http、https、ftp
域名:顶级域名...</p>
</div>
<div class="atricle-item-time">
<span>
2020-10-29
</span>
</div>
</div>
<div class="article-item">
<h2 class="article-item-header">
<a href="/2020/08/22/symbol/">
symbol
</a>
</h2>
<div class="article-item-content">
<p>[toc]
你不知道的Symbol
ES6中新加入的 原始数据类型(基本数据类型/值类型),代表唯一值
对象的唯一属性:防止同名属性,及被改写或覆盖
消除魔术字符串:指代码中多次出现,强耦合的字符串或数值,应避免,而使用含义清晰的变量代替
123456789101112131415161718...</p>
</div>
<div class="atricle-item-time">
<span>
2020-08-22
</span>
</div>
</div>
<div class="article-item">
<h2 class="article-item-header">
<a href="/2020/08/12/《typescript》04-类型深入/">
《typescript》04-类型深入
</a>
</h2>
<div class="article-item-content">
<p>TypeScript - 类型深入联合类型联合类型也可以称为多选类型,当我们希望标注一个变量为多个类型之一时可以选择联合类型标注,或 的关系
标注语法
1变量: 类型一 | 类型二
123456789101112function css(ele: Element, attr: string, va...</p>
</div>
<div class="atricle-item-time">
<span>
2020-08-12
</span>
</div>
</div>
<div class="article-item">
<h2 class="article-item-header">
<a href="/2020/08/11/《typescript》03-接口/">
《typescript》03-接口
</a>
</h2>
<div class="article-item-content">
<p>TypeScript - 接口( Interface)接口TypeScript 的核心之一就是对值(数据)所具有的结构进行类型检查,除了一些前面说到基本类型标注,针对对象类型的数据,除了前面提到的一些方式意外,我们还可以通过: Interface (接口),来进行标注。
接口:对复杂的对象类型进行标...</p>
</div>
<div class="atricle-item-time">
<span>
2020-08-11
</span>
</div>
</div>
<div class="article-item">
<h2 class="article-item-header">
<a href="/2020/08/10/《typescript》02-类型系统/">
《typescript》02-类型系统
</a>
</h2>
<div class="article-item-content">
<p>TypeScript - 类型系统类型系统简单来说类型系统包含:
类型标注(签名)
类型检测
类型标注类型标注就是给数据(变量、函数、类等)添加类型说明
类型标注语法:
变量: 标注类型
1let 变量: 数据类型;
类型检测有了类型标注,编译器会在编译过程中根据标注的类型进行检测,使数据的使...</p>
</div>
<div class="atricle-item-time">
<span>
2020-08-10
</span>
</div>
</div>
</div>
<div class="pagenator">
<a class="extend prev-none">上一页</a>
<span class="extend page-item page-item-select">1</span>
<a class="extend page-item page-item-normal" href="/page/2">2</a>
<a class="extend page-item page-item-normal" href="/page/3">3</a>
<a class="extend page-item page-item-normal" href="/page/4">4</a>
<a class="extend page-item page-item-normal" href="/page/5">5</a>
<a class="extend page-item page-item-normal" href="/page/6">6</a>
<a class="extend next" href="/page/2">下一页</a>
</div>
</div>
<div class="footer">
<div class="container">
<!-- <div class="social">
<ul class="social-list">
</ul>
</div> -->
<div class="copyright">
<span>
© zxl 2017 - 2020
</span>
</div>
<!-- <div class="power">
<span>
Powered by <a href="https://hexo.io" target="_blank" rel="noopener">Hexo</a> & <a href="https://github.com/CaiChenghan/iLiKE" target="_blank" rel="noopener">iLiKE Theme</a>
</span>
</div> -->
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<!--page counter part-->
<script>
function addCount(Counter) {
url = $('.article-date').attr('href').trim();
title = $('.article-title').text().trim();
var query = new AV.Query(Counter);
//use url as unique idnetfication
query.equalTo("url", url);
query.find({
success: function (results) {
if (results.length > 0) {
var counter = results[0];
counter.fetchWhenSave(true); //get recent result
counter.increment("time");
counter.save();
} else {
var newcounter = new Counter();
newcounter.set("title", title);
newcounter.set("url", url);
newcounter.set("time", 1);
newcounter.save(null, {
success: function (newcounter) {
//alert('New object created');
}, error: function (newcounter, error) {
alert('Failed to create');
}
})
}
},
error: function (error) {
//find null is not a error
alert('Error:' + error.code + " " + error.message);
}
});
}
// $(function () {
// var Counter = AV.Object.extend("Counter");
// //only increse visit counting when intering a page
// if ($('.article-title').length == 1) {
// addCount(Counter);
// }
// var query = new AV.Query(Counter);
// query.descending("time");
// // the sum of popular posts
// query.limit(10);
// query.find({
// success: function (results) {
// for (var i = 0; i < results.length; i++) {
// var counter = results[i];
// title = counter.get("title");
// url = counter.get("url");
// time = counter.get("time");
// // add to the popularlist widget
// showcontent = title + " (" + time + ")";
// //notice the "" in href
// $('.popularlist').append('<li><a href="' + url + '">' + showcontent + '</a></li>');
// }
// },
// error: function (error) {
// alert("Error:" + error.code + " " + error.message);
// }
// });
// });
</script>
</div>
</div>
<div class="backtop">
<div class="arrow" id="arrow">
<a href="#" class="icon">↑</a>
<script>
window.addEventListener("scroll", showBackTop, false);
const gototop = _getbyId("arrow");
// if (gototop) {
// gototop.className = "doc-gototop" + (mainTop <= 0 ? " doc-gototop-show" : "");
// }
function showBackTop() {
const scrollheight = getheight()
if (scrollheight > 100) {
const arrow = _getbyId("arrow")
arrow.classList.add("arrow-show");
} else {
arrow.classList.remove("arrow-show");
}
}
function _getbyId(id) {
return document.getElementById(id);
}
function getheight() {
let scrollheight = document.body.scrollTop == 0 ? document.documentElement.scrollTop
: document.body.scrollTop;
return scrollheight;
}
</script>
</div>
</div>
</body>
</html>