使用js在网页中加载markdown文件

develop
bicijinlian 6 years ago
parent 206e8788b6
commit 5405b075a8

@ -4,7 +4,7 @@
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:8431",
"sslPort": 44371
"sslPort": 0
}
},
"profiles": {
@ -18,7 +18,7 @@
"Study.DelegateSeries.MarkdownDoc": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>委托学习</title>
<script src="script/marked/marked.min.js" charset="utf-8"></script>
<script src="script/jquery/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="script/LoadMarkdown.js"></script>
<script>
//需要显示的markdown文件路径
$(function () {
LoadMarkdown("/DelegateStudy.md");
});
</script>
</head>
<body>
<div class="md_render">
内容加载中.......
</div>
</body>
</html>

@ -2,9 +2,9 @@
<html>
<head>
<meta charset="utf-8" />
<title></title>
<title>委托基础</title>
</head>
<body>
index.html
委托基础
</body>
</html>

@ -0,0 +1,15 @@
# 委托系列学习
------
## 委托基础
> 学习委托的概念,学习委托的基本语法和基本使用方法,
> 主要从概念上弄透委托。其它相关概念与高级用法专门学习。
> [详细教程](/DelegateStudy.html)
## 匿名方法
## 泛型委托
## Fun<T>、Action<T>、Private<T>
## Lambda 表达式
## 事件与委托
## 接口与委托
## 委托总结

@ -0,0 +1,10 @@
function LoadMarkdown(markdownfile) {
/// <summary>获取用户名称</summary>
$.get(
markdownfile,
function (data) {
$('.md_render').html(marked(data));
},
"text"
);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save