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
// Menampilkan aler JavaScript | |
alert('Hello World!'); |
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> JS </title> | |
</head> | |
<body> | |
<h1> Hello World </h1> | |
<script> | |
alert('Hai Ini JavaScript Pertamaku'); | |
</script> | |
</body> |
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> JS </title> | |
<script> | |
alert('Hai Ini JavaScript Pertamaku'); | |
</script> | |
</head> | |
<body> | |
<h1> Hello World </h1> | |
<h1> JavaScript di dalam tag head </h1> |
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> JS </title> | |
</head> | |
<body> | |
<h1> Hello World </h1> | |
<script src="javascript.js"></script> | |
</body> | |
</html> |
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> JS </title> | |
</head> | |
<body> | |
<h1> Hello World </h1> | |
<script src="javascript1.js"></script> | |
<script src="javascript2.js"></script> | |
</body> | |
</html> |
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> JS </title> | |
</head> | |
<body> | |
<h1> Hello World </h1> | |
<script src="http://www.w3schools.com/js/myScript1.js"></script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
JS | |
</title> | |
</head> | |
<body> | |
<h1> | |
Output dengan alert() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
JS | |
</title> | |
</head> | |
<body> | |
<h1>Output JavaScript dengan document.write</h1> | |
<script type="text/javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<title> JS </title> | |
<h1>Output JavaScript dengan innerHTML</h1> | |
<p id="ini"></p> | |
<script> | |
document.getElementById("ini").innerHTML = 5 + 6; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
JS | |
</title> | |
</head> | |
<body> | |
<h1> | |
Output JavaScript dengan console.log |
OlderNewer