|
@@ -0,0 +1,23 @@
|
|
|
+let x = 1;
|
|
|
+let y = 2;
|
|
|
+let z = x + y;
|
|
|
+console.log(x);
|
|
|
+console.log(y);
|
|
|
+console.log(z);
|
|
|
+
|
|
|
+// let fireE1 = document.createElementNS("h1");
|
|
|
+// fireE1.innerHTML = "火元素";
|
|
|
+// fire.style.color = "red";
|
|
|
+// doucument.body.appendChild(fireE1);
|
|
|
+// doucument.body.innerHTML = doucument.body.appendChild(fireE1) + "火元素";
|
|
|
+// 创建一个新的 h1 元素
|
|
|
+var h1 = document.createElement("h1");
|
|
|
+
|
|
|
+// 设置 h1 的内容
|
|
|
+h1.textContent = "火元素";
|
|
|
+
|
|
|
+// 设置 h1 的样式
|
|
|
+h1.style.color = "red";
|
|
|
+
|
|
|
+// 将 h1 元素插入到 body 的末尾
|
|
|
+document.body.appendChild(h1);
|