Tag: URL
Program JavaScript Untuk Mendapatkan URL Saat Ini
Contoh: Dapatkan URL Saat Ini // program to get the URL const url1 = window.location.href; const url2 = document.URL; console.log(url1); console.log(url2); Keluaran https://www.google.com/ https://www.google.com/ Pada program di atas, window.location.href properti dan document.URL properti digunakan untuk mendapatkan URL halaman saat ini. Keduanya window.location.href dan document.URL properties mengembalikan URL halaman saat ini.
Read more »