CODE :
<!DOCTYPE html>
<html>
<title>HTML Tutorial</title>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
<html>
<title>HTML Tutorial</title>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
JavaScript :
<button onclick="hello()">アイサツ</button>
<p id="demo"></p>
<script>
function hello() {
let hello = document.getElementById("demo");
hello.textContent = "こんにちは!";
hello.style.fontSize = "50px;"
}
</script>
<p id="demo"></p>
<script>
function hello() {
let hello = document.getElementById("demo");
hello.textContent = "こんにちは!";
hello.style.fontSize = "50px;"
}
</script>
JavaScript :
<button onclick="myFunction()">Click Me!</button>
<script>
function myFunction() {
let x = document.getElementById("demo");
x.style.fontSize = "25px";
x.style.color = "red";
}
</script>
<script>
function myFunction() {
let x = document.getElementById("demo");
x.style.fontSize = "25px";
x.style.color = "red";
}
</script>