1.a.Script
============================================================================
Klik tombol OK untuk menampilkan seluruh informasi saat ini.Klik OK============================================================================
Klik tombol Buka Dokumen Baru untuk membuka halaman baru.
Refresh
function myFunction () {// body...document.getElementById("demo 1").innerHTML = "screen width/lebar layar : "+ screen.width;
document.getElementById("demo 2").innerHTML ="screen height/tinggi layar : "+ screen.availHeight;
document.getElementById("demo 3").innerHTML ="URL halaman saat ini : "+ window.location.href;document.getElementById("demo 4").innerHTML ="Nama host internet saat ini :"+ window.location.host;document.getElementById("demo 5").innerHTML ="Nama pathname halaman saat ini :"+ window.location.pathname;document.getElementById("demo 6").innerHTML ="Nama protocol halaman web saat ini :"+ window.location.protocol;}
function newDoc() {window.location.assign("http://www.akakom.ac.id")}
function refresh(){location.reload()}============================================================================
b.Output
SebelumSesudah
2Heri Purnama125410101Teknologi WebTI 021