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>

  • 相关阅读:
    利用 windbg 脚本动态调试代码
    GetHotkeys 通过驱动获取系统热键 [ 顺便写了 SSDT + Shadow SSDT ]
    获取系统热键链表windbg脚本 GetHotkeys windbg script
    利用SetSysColor函数实现主题修改
    Javascript文件夹选择框的两种解决方案
    Javascript使用AjaxPro构建自动补全,同时自动生成待输行【原创】
    在UpdatePanel中弹出对话框
    JS动态创建表格比较【转】
    JS精美日历时间控件
    myeclipse快捷键大全【转】
  • 原文地址:https://www.cnblogs.com/sna-ling/p/11982033.html
Copyright © 2011-2022 走看看