-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
editor编辑打开报错ERR_FILE_NOT_FOUND #224
Comments
这个是每个md笔记都变成这样了吗 |
不是每个,感觉是有些html标签未用```代码块包围导致的。但html标签有时候是为了做笔记的样式而设置的,没法区分该笔记到底支持哪些html标签。你可以把以下内容复制到为知markdown笔记里保存并编辑试试。
[TOC]
# 首页链接跳转
```
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0;url=./web/index.jsp">
</head>
<body></body>
</html>
```
# UI
## jQuery插件
### 视频播放
http://www.jq22.com/jquery-info404
### 弹出层
http://www.jq22.com/yanshi109
### 可拖拽部件
http://www.jq22.com/yanshi19130
http://www.jq22.com/yanshi16243
### 浮动固定位置插件
http://www.jq22.com/jquery-info224
### 仿桌面效果
http://www.jq22.com/jquery-info15568
http://www.jq22.com/jquery-info2571
### tab标签
http://www.jq22.com/jquery-info15053
http://www.jq22.com/yanshi18886
### 多级导航
http://www.jq22.com/jquery-info15900
### 右键菜单
http://www.jq22.com/jquery-info19178
### 后台框架
http://x.xuebingsi.com/
- XHTML( 是更严谨更纯净的 HTML 版本)文档类型声明定义文档的类型:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- 空标签:`<hr> , <br> 和 <img>`应该被替换为` <hr /> 和 <br />`
验证网页是否规范在该网页下端输入网址验证即可 http://www.w3school.com.cn/xhtml/xhtml_validate.asp
# HTML5中不允许写结束标记的元素:
area、base、br、col、command、embed、hr、img、input、keygen、link、meta、param、source、track、wbr。
# 允许省略结束标记的元素:
li、dt、dd、p、rt、rp、optgroup、option、colgroup、thead、tbody、tfoot、tr、td、th。
# 允许省略的标记:
html、head、body、colgroup、tbody。
# 网页元标记信息
- **字符集编码**
- GB2312 => GBK => GB18030
- GB18030与GBK,GB2312,ASCII 都兼容。
- unicode国标=>utf-8压缩体积
- 对于 ASCII 字比较多的文章, UTF-8 压缩效率明显, 基本可以降低一半体积。 但是对于汉字较多的文章, UTF-8不如 unicode。
- windows 下常见的是一种叫 ANSI 的编码。 但其实 ANSI 并不是一种“编码” ,ANSI 会根据操作系统系统所在的地域,自动指定为一种地域性的 DBCS , 如在简体中文的 windows 下 ANSI 其实就是 GBK, windows 默认使用 ANSI , 比如你建一个记事本文件,在里面的字默认会是 ANSI 的。
<meta charset="utf-8"/>
<meta charset="ISO-8859-1"/>
英文:"ISO-8859-15"
Unicode:"utf-8"
中文(简体):"GBK"
中文(简体):"gb18030"
# input标签
```
<input type="file" name="file" size="50" />//选择文件
<br />
<input type="submit" value="Upload File" />提交
```
- **全局语言设置**
```
<html lang="zh">
...
</html>
```
- **搜索引擎关键字(提高搜索排名)**
```
<meta name="keywords" content="关键字,keywords"/><!--关键字之间用逗号隔开-->
```
- **页面描述(搜索引擎显示给用户看)**
<meta name="description" content="网页的介绍">
- **页面定时跳转或刷新**
```
<meta http-equiv="refresh" content=“秒;[url=网址]”/>
如果省略 [url=网址]则页面只刷新不跳转,如 <meta http-equiv="refresh" content=“5”/>
```
# 文本
## 特殊符号输入
http://www.w3school.com.cn/tags/html_ref_symbols.html
## 空格输入
 
各种特殊符号输入
https://www.cnblogs.com/bykj/p/5927893.html
## 上标和下标的输入
10. 无序列表
11. 有序列表
# 图像
12. 图像路径
图像路径全部使用相对路径表示,分隔号 "/"用来分割网络路径,上级目录用 ".."表示,上级的上级用"../.."表示
13. 插入图像
14. 图像的属性
src:图像的相对路径
ismap:把图像定义为服务器端的图像映射
usemap:把图像定义为客户端图像映射。参阅<map>和<area>标记。
vspace:定义图像顶部和底部空白像素数。一般使用CSS代替。
width:图像宽度(像素),100%则与网页大小等宽。
height: 图像高度(像素),100%则与网页大小等高
alt:给图像加个提示,方便搜索引擎检索
# 超级链接
15. 文本和图像超级链接
17. 新窗口打开超级链接
设置 target 的属性为“_blank”即可。默认当前窗口打开链接为"_self"属性,可省略。herf里的“http://”一定不能省略。
<a herf=" http:// www.baidu.com" target="_blank">新窗口打开百度</a>
18. 创建热点区域
19. 中文字符,头文件里加<meta charset="utf-8"/>
20. 网站浏览器标签页图标:在<head>标签里加入如下语句
<link rel="shortcut icon" href="图片路径" >
支持常用图片格式。
21. 自适应:Chrome不同硬件客户端查看效果为“开发者工具——然后点击菜单栏手机图标按钮”
22. 注释
```
/* css的注释方法*/
```
```
<!-- html的注释方法:START -->
<!-- html的注释方法:END -->
```
```
//js的注释方法
<!--js注释-->
/*
下面的这些代码会输出
一个标题和一个段落
并将代表主页的开始
*/
```
23. 样式
<style>
div { border :1px solid #00FF00; width :100px;text-align:center; cursor :hand;}
</style>
当在HTML 中定义为 id ="divID"时,在CSS 对应的设置语法则是#divID{},如果在HTML 中定义为 class ="divID"时,则在 CSS 中对应的设置语法是.divID
如果id="divID"这个层中包括了一个<img></img>,则这个img 在CSS 中对应 的设置语法应该是#divID img {},同样,如果是包含在class="divID"这个层 中时,则设置语法应该是.divID img {}
# 事件
窗口事件、表单事件、键盘事件、鼠标事件
## 鼠标事件
| 事件 | 当...时发生 |
|---|--|
| onabort | 用户终止页面加载。 |
| onblur | 用户离开对象。 |
| onchange | 用户改变对象的值。 |
| onclick | 用户点击对象。 |
| ondblclick | 用户双击对象。 |
| onfocus | 用户激活对象。 |
| onkeydown | 按下键盘。 |
| onkeypress | 按压键盘。 |
| onkeyup | 松开键盘。 |
| onload |页面完成加载。注释:在 Netscape 中,当页面加载时会发生该事件。
| onmousedown | 用户按鼠标按钮。 |
| onmousemove | 鼠标指针在对象上移动。 |
| onmouseover | 鼠标指针移动到对象上。 |
| onmouseout | 鼠标指针移出对象。 |
| onmouseup | 用户释放鼠标按钮。 |
| onreset | 用户重置表单。 |
| onselect | 用户选取页面上的内容。 |
| onsubmit | 用户提交表单。 |
| onunload | 用户关闭页面。 |
# 分栏
<hr/>用横线把上下之间隔开
## div角色
比如用div做button,那么设置div 的 role=“button”,辅助工具就可以认出这实际上是个button,比如,
<div role="checkbox" aria-checked="checked"></div>
辅助工具就会知道,这个div实际上是个checkbox的角色,为选中状态。
## 插入音频和视频
### 音频格式支持ogg、mp3、wav格式,形式如下
<audio src="song.mp3" controls="controls"></audio>
多个音频文件如下
<audio controls="controls">
<source src="1.ogg" type="audio/ogg">
<source src="2.mp3" type="audio/mpeg">
</audio>
属性值描述
autoplay
Autoplay 自动播放
Controls 控制按钮
loop 循环
Preload 加载时预备播放
url 音频地址
autobuffer Autobuffer 自动缓冲
### 视频支持ogg、webm和mp4格式,mp4需要是AVC编码格式
```
<video src="1.mp4" controls=" controls "></video>
```
属性值描述
autoplay
Autoplay 自动播放
Controls 控制按钮
loop 循环
Preload 加载时预备播放
url 视频地址
width 宽度值
height 高度值
poster url 视频未响应或缓冲不足时连接到一个图像进行显示
# 节点访问:
通过getElementById()和getElementsByTagName()方法,
查找一个元素关联的元素:通过parentNode、firstChild以及lastChild属性
# 显示代码
pre 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。<code> 标签用于表示计算机源代码或者其他机器可以阅读的文本内容。
```
<pre>
<code>
代码内容
<!DOCTYPE HTML>
<html>
<body onload="init()">
<!--地图显示的div-->
<div id="map" style="position:absolute;left:0px;right:0px;width:800px;height:500px;" >
</div>
</body>
</html>
</code>
</pre>
```
# 示例代码
## 打开文件夹
```
<html>
<body>
<form>
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
```
## 删除或改变div
```
/*----------------内置UI改进start-----------------*/
var child=document.getElementById("p1");//ID号获取元素
var Zoom_in=document.querySelector(".leaflet-control-zoom-in");//类获取元素
var Zoom_out1=document.querySelector(".leaflet-control-zoom-out");
Zoom_in.setAttribute("title","放大");
Zoom_out1.setAttribute("title","缩小");
var ctrattr1=document.querySelector(".iclient-leaflet-logo");
var ctrattr2=document.querySelector(".leaflet-control-attribution");
ctrattr1.parentNode.removeChild(ctrattr1);
ctrattr2.parentNode.removeChild(ctrattr2);
/*----------------内置UI改进end-----------------*/
```
![](index_files/0ffcbbc4-b6f0-47aa-96be-8e393b0a828c.png)
## 增加div
- 方法1
```
var para=document.createElement("p");
var node=document.createTextNode("这是新段落。");
para.appendChild(node);
var element=document.getElementById("div1");
element.appendChild(para);
```
- 方法2
```
(function () {
var box=document.querySelector("#box");
var con1=document.createElement("div");
box.appendChild(con1);
})();
```
## 改变页面指向
```
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0;url=./web/index.html">
</head>
<body></body>
</html>
```
在 2021-07-26 19:53:25,"WuHuan" ***@***.***> 写道:
这个是每个md笔记都变成这样了吗
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
新建了笔记HTML5.MD,用了一段时间后打开editor编辑打开报错如下:
Page failed to load.
URL: file:///C:/Users/AAA/Documents/My%20Knowledge/temp/editor_md_temp/c69adab2-b965-4393-b24e-e5a9f17f6ce9/web/index.html
Error: -6 (-6)
ERR_FILE_NOT_FOUND
但用为之原始的非markdown编辑是正常的。
The text was updated successfully, but these errors were encountered: