这里只是解析,没有加载,需要用php或者java读取文档内容或者获取数据库内容,解析
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Marked in the browser</title>
</head>
<body>
<div id="content"></div>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
document.getElementById('content').innerHTML =marked('# 标记在浏览器中\n\n 呈现 **marked**.');
</script>
</body>
</html>