zoukankan      html  css  js  c++  java
  • markdown语法

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js"></script>
    </head>
    <body>
    <div id="content"></div>
    <script>
    var markdown=`
    # Marked in the browser
    ## Rendered by **marked**.
    [百度](http://baidu.com)
    `
    var html= marked(markdown);
    document.getElementById('content').innerHTML =html;
    </script>
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js"></script>
    <link rel="stylesheet" href="https://typo.sofi.sh/typo.css">
    <style>
    padding:16px;
    </style>
    </head>
    <body>
    <div id="content"></div>


    <script>
    var markdown=`
    # 我的第一遍博客

    **小凌**
    >不要相信网上的名人名言。——鲁迅
    大家好我今天学会了markdown语法了。
    ![](https://p0.meituan.net/dpmerchantpic/659eb04d72c3f511dfa6ea9d55fcbd08541010.jpg%40watermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20)
    `
    var html= marked(markdown);
    document.getElementById('content').innerHTML =html;
    </script>
    </body>

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js"></script>
    <link rel="stylesheet" href="https://typo.sofi.sh/typo.css">
    <style>
    padding:16px;
    </style>
    </head>
    <body>
    <div id="content"></div>


    <script>
    var markdown=`
    # 我的第一遍博客

    **小凌**
    >不要相信网上的名人名言。——鲁迅
    大家好我今天学会了markdown语法了。
    <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1072406476,383999741&fm=26&gp=0.jpg" 300>
    `
    var html= marked(markdown);
    document.getElementById('content').innerHTML =html;
    </script>
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js"></script>
    <link rel="stylesheet" href="https://typo.sofi.sh/typo.css">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <style>
    body{padding:16px;}
    img{
    max-100%;
    }
    </style>
    </head>
    <body>
    <div id="content"></div>
    <script>
    var markdown=`
    # 我的第一遍博客


    **小凌**
    >不要相信网上的名人名言。——鲁迅

    大家好我今天学会了markdown语法了。

    <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1072406476,383999741&fm=26&gp=0.jpg">
    `
    var html= marked(markdown);
    document.getElementById('content').innerHTML =html;
    </script>
    </body>
    </html>

    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js"></script>
    <link rel="stylesheet" href="https://typo.sofi.sh/typo.css">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <style>
    body{padding:16px;}
    img{
    max-100%;
    }
    </style>
    </head>
    <body>
    <div id="content">
    # 我的第一遍博客

    **小凌**

    >不要相信网上的名人名言。——鲁迅

    大家好我今天学会了markdown语法了。

    <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1072406476,383999741&fm=26&gp=0.jpg">
    </div>
    <script>
    var content=document.getElementById("content");
    var markdown=content.innerHTML
    console.log(markdown);
    </script>
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js"></script>
    <link rel="stylesheet" href="https://typo.sofi.sh/typo.css">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <style>
    body{padding:16px;}
    img{
    max-100%;
    }
    </style>
    </head>
    <body>
    <div id="content">
    # 我的第一篇博客

    **小凌**

    __不要相信网上的名人名言。——鲁迅__

    大家好我今天学会了markdown语法了。

    <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1072406476,383999741&fm=26&gp=0.jpg">
    </div>
    <script>
    var content=document.getElementById("content");
    var markdown=content.innerHTML
    <!-- console.log(markdown); -->
    var html=marked(markdown)
    content.innerHTML=html
    </script>
    </body>
    </html>

  • 相关阅读:
    【渗透攻防】深入了解Windows
    浅析B/S架构数据库连接方式
    剖析泄露你银行卡密码的钓鱼网站:真假“10086”
    红黑树的删除和加入节点
    Unity里包裹Debug,且不影响Debug的重定向
    Java向上转型和向下转型(附具体样例)
    Javascript 方法apply和call的差别
    普通androidproject转换为C/C++project之后,再还原成androidproject的解决方式
    初识双网卡
    js面向对象编程: js类定义函数时prototype和this差别?
  • 原文地址:https://www.cnblogs.com/sna-ling/p/11982033.html
Copyright © 2011-2022 走看看