12345678910111213141516171819202122232425 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>Landscape Document</title>
- </head>
- <body>
- <div id="content"></div>
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
- <script>
- // IE7+, Firefox, Chrome, Opera, Safari, otherwise IE5, IE6
- var xmlhttp = (window.XMLHttpRequest ?new XMLHttpRequest() :new ActiveXObject("Microsoft.XMLHTTP"));
- xmlhttp.onreadystatechange = function() {
- // assuming everything was good, parse requested file as markdown (marked.js)
- if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
- //document.getElementById('content').innerHTML = marked.parse('# Marked in browser\n\nRendered by **marked**.');
- document.getElementById('content').innerHTML = marked.parse(xmlhttp.responseText);
- }
- }
- xmlhttp.open("GET", "index.md", true);
- xmlhttp.send();
- </script>
- </body>
- </html>
|