تحرير مدونة:
نرى النتيجة »
انها محاولة لنفسك - ©
w3ii.com
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
p
>
Display the entire URL of the current page.
<
/p
>
<
p
id
="demo"
>
<
/p
>
<
script
>
document.getElementById(
"demo"
).innerHTML =
"Page location is: "
+ window.location.href;
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <p>Display the entire URL of the current page.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "Page location is: " + window.location.href; </script> </body> </html>