-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
660 lines (614 loc) · 29.5 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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>软嵌物联集</title>
<link rel="icon" href="image/RQWLJ.jpg" type="image/png">
<style>
/* PC端样式 */
@media (min-width: 769px) {
body {
font-family: Arial, sans-serif;
margin: 0;
display: flex;
flex-direction: column;
height: 100vh;
background-color: #ffffff;
color: #333;
}
.small-font {
font-size: 0.6em;
}
.toolbar {
background-color: #ffffff;
color: #333;
padding: 10px 15px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
display: flex;
align-items: center;
border-bottom: 1px solid #d3d3d3;
}
.toolbar h1 {
margin: 0;
display: flex;
align-items: center;
}
.toolbar img {
max-width: 40px;
height: auto;
margin-right: 10px;
}
.button-group {
margin-left: 200px;
display: flex;
gap: 30px;
}
.toolbar .button {
font-size: 1.2em;
padding: 3px 10px;
background-color: #ffffff;
color: #000;
border-radius: 4px;
border: none;
cursor: pointer;
transition: background 0.3s, border-color 0.3s;
}
.toolbar .button:hover {
border-color: #007bff;
}
.main {
display: flex;
flex: 1;
margin: 0px;
overflow: hidden;
}
.sidebar {
width: 250px;
background-color: #ffffff;
padding: 15px;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
overflow-y: auto;
border-right: 1px solid #d3d3d3;
}
.sidebar h2 {
margin-top: 0;
}
.sidebar a {
display: block;
padding: 10px;
text-decoration: none;
color: #333;
border-radius: 4px;
transition: background 0.3s;
}
.sidebar a:hover {
background: #f0f0f0;
}
.bold-link {
font-weight: bold;
}
.sub-menu {
padding-left: 15px;
display: none;
}
.toggle-button {
cursor: pointer;
padding: 10px;
text-align: left;
background: none;
border: none;
color: #333;
width: 100%;
font-weight: bold;
font-size: 1em;
}
.toggle-icon {
width: 12px;
height: 12px;
margin-left: 5px;
transition: transform 0.3s;
}
.rotate {
transform: rotate(90deg);
}
.sub-menu a {
font-weight: normal;
font-size: 0.9em;
padding-left: 20px;
}
nav {
text-align: left; /* 左对齐 */
margin-bottom: 5px; /* 底部间距 */
margin-left: 15px; /* 左侧间距 */
}
nav ul {
list-style-type: none; /* 去掉默认列表样式 */
padding: 0; /* 去掉内边距 */
}
nav a {
text-decoration: none; /* 去掉下划线 */
color: #007bff; /* 链接颜色 */
padding: 10px 15px; /* 内边距 */
border-radius: 5px; /* 圆角 */
transition: background-color 0.3s, color 0.3s; /* 动效 */
}
/* 悬停效果 */
nav a:hover {
background-color: #0056b3; /* 悬停时背景色 */
color: #0056b3; /* 悬停时文字颜色 */
}
}
/* 手机端样式 */
@media (max-width: 768px) {
body {
font-family: Arial, sans-serif;
margin: 0;
display: flex;
flex-direction: column;
height: 100vh;
background-color: #ffffff;
color: #333;
}
.toolbar {
background-color: #ffffff;
color: #333;
padding: 10px 15px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
display: flex;
height: 40px;
align-items: center;
border-bottom: 1px solid #d3d3d3;
}
.toolbar h1 {
margin: 0;
display: flex;
align-items: center;
}
.toolbar img {
max-width: 40px;
height: auto;
margin-right: 10px;
border-bottom: 0px;
}
.main {
display: flex;
flex: 1;
overflow: hidden;
position: relative; /* 使主内容区域相对定位 */
}
.sidebar {
width: 250px;
background-color: #ffffff;
padding: 15px;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
overflow-y: auto;
border-right: 1px solid #d3d3d3;
position: absolute; /* 绝对定位 */
top: 0px; /* 调整位置以适应工具栏 */
left: 0;
z-index: 1000; /* 确保侧边栏在主内容之上 */
height: calc(100vh - 40px); /* 高度为视口高度减去工具栏高度 */
display: none; /* 默认隐藏 */
}
.sidebar h2 {
margin-top: 0;
}
.sidebar a {
display: block;
padding: 10px;
text-decoration: none;
color: #333;
border-radius: 4px;
transition: background 0.3s;
}
.sidebar a:hover {
background: #f0f0f0;
}
.bold-link {
font-weight: bold;
}
.sub-menu {
padding-left: 15px;
display: none;
}
.toggle-button {
cursor: pointer;
padding: 10px;
text-align: left;
background: none;
border: none;
color: #333;
width: 100%;
font-weight: bold;
font-size: 1em;
}
.toggle-icon {
width: 12px;
height: 12px;
margin-left: 5px;
transition: transform 0.3s;
}
.rotate {
transform: rotate(90deg);
}
.sub-menu a {
font-weight: normal;
font-size: 0.9em;
padding-left: 20px;
}
.divider {
height: 1px; /* 分割线的高度 */
background-color: #d3d3d3; /* 分割线的颜色 */
margin: 0; /* 去掉上下边距 */
}
}
.selected {
background-color:#d3d3d3; /* 选中时的背景颜色 */
color: #fff; /* 选中时的字体颜色 */
transition: background 0.3s, color 0.3s; /* 添加过渡效果 */
}
</style>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?cf38181d0a19e4b8ef32a4391cb7e2aa";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div id="toolbar"></div> <!-- 添加这个元素 -->
<div class="main" id="main">
<div class="sidebar" id="sidebar">
<!-- 默认加载内容 -->
</div>
<iframe id="contentArea" style="flex: 1; border: none; margin-top: 0px;" src="" frameborder="0"></iframe>
</div>
<script>
let sidebarVisible = false; // 侧边栏初始为可见状态
let PCStatus = true; // 默认是true pc
function toggleSidebar() {
const sidebar = document.getElementById('sidebar');
sidebarVisible = !sidebarVisible; // 切换状态
sidebar.style.display = sidebarVisible ? 'block' : 'none'; // 显示或隐藏侧边栏
}
function toggleSubMenu(subMenuId, iconId) {
const subMenu = document.getElementById(subMenuId);
const toggleIcon = document.getElementById(iconId);
if (subMenu.style.display === 'block') {
subMenu.style.display = 'none';
toggleIcon.classList.remove('rotate');
} else {
subMenu.style.display = 'block';
toggleIcon.classList.add('rotate');
}
}
function loadContent(file, button) {
const iframe = document.getElementById('contentArea');
iframe.src = file; // 设置 iframe 的 src 属性为要加载的文件
// 清空锚点
iframe.onload = function() {
// 确保在加载新内容时清除锚点
iframe.contentWindow.location.hash = '';
};
// 获取所有的锚点链接
const allLinks = document.querySelectorAll('a[href^="#"]');
// 清空每个链接的 href 属性
allLinks.forEach(link => {
link.setAttribute('href', 'javascript:void(0);');
});
// 移除所有按钮的选中状态
const buttons = document.querySelectorAll('.sub-menu a');
buttons.forEach(btn => {
btn.classList.remove('selected');
});
// 为当前按钮添加选中状态
if (button) {
button.classList.add('selected');
}
}
function loadContentjump(url, button) {
const iframe = document.getElementById('contentArea');
iframe.src = url; // 设置 iframe 的 src 属性为要加载的文件
// 确保在 iframe 加载完成后再发送消息
iframe.onload = function() {
const anchor = url.split('#')[1]; // 获取锚点部分
if (anchor) {
// 发送消息给 iframe
iframe.contentWindow.postMessage(anchor, '*'); // 使用 '*' 发送到任何来源
}
};
// 移除所有按钮的选中状态
const buttons = document.querySelectorAll('.sub-menu a');
buttons.forEach(btn => {
btn.classList.remove('selected');
});
// 为当前按钮添加选中状态
if (button) {
button.classList.add('selected');
}
}
function loadToolbarmain()
{
if(PCStatus)
{
const toolbar = document.getElementById('toolbar');
toolbar.innerHTML = `
<div class="toolbar">
<h1>
<img src="image/RQWLJ-white.jpg" alt="Logo">
<span class="small-font">软嵌物联集</span>
</h1>
<div class="button-group">
<button class="button" onclick="loadTrainingContent()">
❤️嵌入式面试突击
</button>
<button class="button" onclick="loadSoftEmbeddedContent()">
❤️软嵌物联集
</button>
</div>
</div>
`;
}
else
{
const toolbar = document.getElementById('toolbar');
toolbar.innerHTML = `
<div class="toolbar">
<h1>
<button class="toggle-button" onclick="toggleSidebar()">
<img src="image/Android.png" alt="Android" style="max-width: 20px; vertical-align: middle; margin-right: 5px;">
</button>
<img src="image/RQWLJ-white.jpg" alt="Logo" >
</h1>
</div>
`;
}
}
//Android 布局
function loadTrainingContentAd() {
const sidebar = document.getElementById('sidebar');
// 清空侧边栏内容并加载面试集训的内容
sidebar.innerHTML = `
<button class="toggle-button" onclick="loadContent('Source/zsxqjj.html')">
星球公告
</button>
<button class="toggle-button" onclick="loadContent('Source/jlzd.html')">
了解我的知识星球
</button>
<nav>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#embedded-learning')">学习路线</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#resume-guidance')">简历指导</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#offer-selection')">Offer 选择</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#embedded-resources')">嵌入式最全面经</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#jrfs')">加入方式</a>
</nav>
`;
loadContent('Source/zsxqjj.html'); // 加载面试集训的内容
}
function loadSoftEmbeddedContentAd() {
const sidebar = document.getElementById('sidebar');
// 清空侧边栏内容并加载软嵌物联集的内容
sidebar.innerHTML = `
<div class="toggle-button">
<button class="toggle-button" onclick="loadTrainingContentAd()">
❤️嵌入式面试突击
</button>
<button class="toggle-button" onclick="loadSoftEmbeddedContentAd()">
❤️软嵌物联集
</button>
</div>
<div class="divider"></div> <!-- 添加分割线 -->
<button class="toggle-button" onclick="loadContent('Source/introduction.html')">
前言
</button>
<button class="toggle-button" onclick="loadContent('Source/Interview_Guide.html')">
面经大纲
</button>
<button class="toggle-button" onclick="toggleSubMenu('cLangSubMenu', 'toggleIcon1')">
C语言面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon1">
</button>
<div class="sub-menu" id="cLangSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/C_1.html', this)">C语言高频面经(一)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C_2.html', this)">C语言高频面经(二)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C_3.html', this)">C语言高频面经(三)内存管理</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('cppSubMenu', 'toggleIcon2')">
C++面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon2">
</button>
<div class="sub-menu" id="cppSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/C++_1.html', this)">C++高频面经(一)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_2.html', this)">C++高频面经(二)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_3.html', this)">C++高频面经(三)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_4.html', this)">C++高频面经(四)新特性</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_5.html', this)">C++高频面经(五)虚函数</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_6.html', this)">C++高频面经(六)STL容器</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('osSubMenu', 'toggleIcon3')">
操作系统面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon3">
</button>
<div class="sub-menu" id="osSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/OS1.html', this)">操作系统(一)线程和进程</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS2.html', this)">操作系统(二)线程和进程续</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS3.html', this)">操作系统(三)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS4.html', this)">操作系统(四)linux基础</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS5.html', this)">操作系统(五)linux命令</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS6.html', this)">操作系统(六)虚拟地址/页表</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS7.html', this)">操作系统(七)linux内核</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('networkSubMenu', 'toggleIcon4')">
计算机网络面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon4">
</button>
<div class="sub-menu" id="networkSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/network1.html', this)">计算机网络(一)网络基础</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network2.html', this)">计算机网络(二)TCP/IP</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network3.html', this)">计算机网络(三)UDP</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network4.html', this)">计算机网络(四)网络编程</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network5.html', this)">计算机网络(五)HTTP/HTTPS</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network6.html', this)">计算机网络(六)HTTP/HTTPS续</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('embeddedSubMenu', 'toggleIcon5')">
嵌入式基础知识
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon5">
</button>
<div class="sub-menu" id="embeddedSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/qrs1.html', this)">嵌入式基础(一)基本概念</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs2.html', this)">嵌入式基础(二)ARM基础</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs3.html', this)">嵌入式基础(三)基础外设</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs4.html', this)">嵌入式基础(四)Bootloader</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs5.html', this)">嵌入式基础(五)ARM架构</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs6.html', this)">嵌入式基础(六)单片机基础</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('rtosSubMenu', 'toggleIcon6')">
算法
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon6">
</button>
<div class="sub-menu" id="rtosSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/pxsf.html', this)">常见排序算法总结</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('dataStructureSubMenu', 'toggleIcon7')">
嵌入式实战
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon7">
</button>
<div class="sub-menu" id="dataStructureSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/qrssz.html', this)">实战问题总结</a>
</div>
`;
loadContent('Source/introduction.html'); // 加载软嵌物联集的内容
}
// =====================PC布局
function loadTrainingContent() {
const sidebar = document.getElementById('sidebar');
// 清空侧边栏内容并加载面试集训的内容
sidebar.innerHTML = `
<button class="toggle-button" onclick="loadContent('Source/zsxqjj.html')">
星球公告
</button>
<button class="toggle-button" onclick="loadContent('Source/jlzd.html')">
了解我的知识星球
</button>
<nav>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#embedded-learning')">学习路线</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#resume-guidance')">简历指导</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#offer-selection')">Offer 选择</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#embedded-resources')">嵌入式最全面经</a>
<a href="javascript:void(0);" onclick="loadContentjump('Source/jlzd.html#jrfs')">加入方式</a>
</nav>
`;
loadContent('Source/zsxqjj.html'); // 加载面试集训的内容
}
function loadSoftEmbeddedContent() {
const sidebar = document.getElementById('sidebar');
// 清空侧边栏内容并加载软嵌物联集的内容
sidebar.innerHTML = `
<button class="toggle-button" onclick="loadContent('Source/introduction.html')">
前言
</button>
<button class="toggle-button" onclick="loadContent('Source/Interview_Guide.html')">
面经大纲
</button>
<button class="toggle-button" onclick="toggleSubMenu('cLangSubMenu', 'toggleIcon1')">
C语言面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon1">
</button>
<div class="sub-menu" id="cLangSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/C_1.html', this)">C语言高频面经(一)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C_2.html', this)">C语言高频面经(二)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C_3.html', this)">C语言高频面经(三)内存管理</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('cppSubMenu', 'toggleIcon2')">
C++面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon2">
</button>
<div class="sub-menu" id="cppSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/C++_1.html', this)">C++高频面经(一)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_2.html', this)">C++高频面经(二)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_3.html', this)">C++高频面经(三)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_4.html', this)">C++高频面经(四)新特性</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_5.html', this)">C++高频面经(五)虚函数</a>
<a href="javascript:void(0);" onclick="loadContent('Source/C++_6.html', this)">C++高频面经(六)STL容器</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('osSubMenu', 'toggleIcon3')">
操作系统面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon3">
</button>
<div class="sub-menu" id="osSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/OS1.html', this)">操作系统(一)线程和进程</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS2.html', this)">操作系统(二)线程和进程续</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS3.html', this)">操作系统(三)</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS4.html', this)">操作系统(四)linux基础</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS5.html', this)">操作系统(五)linux命令</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS6.html', this)">操作系统(六)虚拟地址/页表</a>
<a href="javascript:void(0);" onclick="loadContent('Source/OS7.html', this)">操作系统(七)linux内核</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('networkSubMenu', 'toggleIcon4')">
计算机网络面经
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon4">
</button>
<div class="sub-menu" id="networkSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/network1.html', this)">计算机网络(一)网络基础</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network2.html', this)">计算机网络(二)TCP/IP</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network3.html', this)">计算机网络(三)UDP</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network4.html', this)">计算机网络(四)网络编程</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network5.html', this)">计算机网络(五)HTTP/HTTPS</a>
<a href="javascript:void(0);" onclick="loadContent('Source/network6.html', this)">计算机网络(六)HTTP/HTTPS续</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('embeddedSubMenu', 'toggleIcon5')">
嵌入式基础知识
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon5">
</button>
<div class="sub-menu" id="embeddedSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/qrs1.html', this)">嵌入式基础(一)基本概念</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs2.html', this)">嵌入式基础(二)ARM基础</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs3.html', this)">嵌入式基础(三)基础外设</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs4.html', this)">嵌入式基础(四)Bootloader</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs5.html', this)">嵌入式基础(五)ARM架构</a>
<a href="javascript:void(0);" onclick="loadContent('Source/qrs6.html', this)">嵌入式基础(六)单片机基础</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('rtosSubMenu', 'toggleIcon6')">
算法
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon6">
</button>
<div class="sub-menu" id="rtosSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/pxsf.html', this)">常见排序算法总结</a>
</div>
<button class="toggle-button" onclick="toggleSubMenu('dataStructureSubMenu', 'toggleIcon7')">
嵌入式实战
<img src="image/arrow.png" alt="Arrow" class="toggle-icon" id="toggleIcon7">
</button>
<div class="sub-menu" id="dataStructureSubMenu">
<a href="javascript:void(0);" onclick="loadContent('Source/qrssz.html', this)">实战问题总结</a>
</div>
`;
loadContent('Source/introduction.html'); // 加载软嵌物联集的内容
}
// 根据屏幕宽度重定向到不同的 HTML 文件
function redirectBasedOnScreenSize() {
if (window.innerWidth <= 768) {
PCStatus = !PCStatus;
} else {
PCStatus = true; // 针对 PC 设备
}
}
window.onload = function() {
redirectBasedOnScreenSize(); // 根据屏幕宽度重定向
loadToolbarmain();//显示布局
if(PCStatus)
{
loadSoftEmbeddedContent(); // 默认加载软嵌物联集的内容
}
else
{
loadSoftEmbeddedContentAd();//安卓布局
}
};
</script>
</body>
</html>