<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <title>Masalah dengan Metode JavaScript Document.write ()</title>
</head>
<body>
    <h1>Ini adalah heading</h1>
    <p>Ini adalah paragraph dari text.</p>
    
    <button type="button" onclick="document.write('Halo dunia!')">Klik Saya</button>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.