Menu

JavaScript

JavaScriptの基礎を学習しよう

はじめる

JavaScript :

<button onclick="hello()">アイサツ</button>
<p id="demo"></p>

<script>
function hello() {
  let hello = document.getElementById("demo");
  hello.textContent = "こんにちは!";
  hello.style.fontSize = "50px;"
}
</script>