<form name="myForm">
<p id="demo"></p>
<input type="text" id="demoJS">
</form>
<script>
document.getElementById("demo").innerHTML = "Hello JavaScript!";
document.getElementById("demoJS").value = "Hello JavaScript!";
var isian = document.myForm.demoJS.value;
console.log('ISI:', isian);
</script>
Current time is <span id="show_date"></span>
<script>
var show_date = document.getElementById("show_date");
var current_date = new Date();
var date = `${current_date.getHours()}:${current_date.getMinutes()}`;
show_date.innerHTML = date;
</script>
Tidak ada komentar:
Posting Komentar