Spaces:
Running
Running
Update index.html
Browse files- index.html +7 -8
index.html
CHANGED
|
@@ -5,8 +5,7 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
<title>My static Space</title>
|
| 7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
<style>
|
| 12 |
.chart{
|
|
@@ -134,12 +133,12 @@ C --> D[End]
|
|
| 134 |
const form = document.getElementById("my-form");
|
| 135 |
const inp = form.elements["inp"];
|
| 136 |
//const inpValue = inp.value || "Not specified";
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
this_id=document.getElementById("test1")
|
| 144 |
this_id.innerText=inp.value
|
| 145 |
$('#mermaid').html(node.data.graph).removeAttr('data-processed');
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
<title>My static Space</title>
|
| 7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
| 8 |
+
<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>
|
|
|
|
| 9 |
|
| 10 |
<style>
|
| 11 |
.chart{
|
|
|
|
| 133 |
const form = document.getElementById("my-form");
|
| 134 |
const inp = form.elements["inp"];
|
| 135 |
//const inpValue = inp.value || "Not specified";
|
| 136 |
+
const node = document.createElement("pre");
|
| 137 |
+
node.classList.add('mermaid');
|
| 138 |
+
const textnode = document.createTextNode(inp.value);
|
| 139 |
+
node.appendChild(textnode);
|
| 140 |
+
node.innerHTML=inp.value;
|
| 141 |
+
document.getElementById("myList").appendChild(node);
|
| 142 |
this_id=document.getElementById("test1")
|
| 143 |
this_id.innerText=inp.value
|
| 144 |
$('#mermaid').html(node.data.graph).removeAttr('data-processed');
|