Created
October 23, 2019 14:07
-
-
Save adityardiansyah/43017f224337958910997b17ab1b1247 to your computer and use it in GitHub Desktop.
Belajar fungsi Javascript dengan klik tombol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<htmL> | |
<head> | |
<title>Belajar JavaScript</title> | |
<script> | |
function tambah_semangat(){ | |
var a = document.getElementById("div_semangat"); | |
a.innerHTML += "<p>Sedang Belajar Javascript, Semangat..!!!</p>"; | |
} | |
</script> | |
</head> | |
<body> | |
<h1> | |
Belajar Javascript | |
</h1> | |
<p> | |
Saya Sedang belajar Javascript di UMSIDA | |
</p> | |
Klik Tombol ini untuk menambahkan kalimat baru : | |
<button id="tambah" onclick="tambah_semangat()">Semangat ...</button> | |
<div id="div_semangat"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment