forked from nerfies/nerfies.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
22 lines (22 loc) · 766 Bytes
/
Copy pathtest.html
File metadata and controls
22 lines (22 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MathJax in Head</title>
<!-- 加载 MathJax -->
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
const formula = String.raw`\(\int_a^b f(x) \, dx = F(b) - F(a)\)`;
const headElement = document.querySelector('head');
const mathDisplay = document.createElement('div');
mathDisplay.innerHTML = formula;
document.body.appendChild(mathDisplay);
});
</script>
</head>
<body>
<h1>公式来自 <head></h1>
</body>
</html>