I have a problem with my function onload(). I started onload at body
<body onload="myLoad();">
and I made a script
<script>
function myLoad() {
alert("Test");
}</script>
It worked for this version. But when I added more in script it stopped work.
<script>
function myLoad() {
alert("Test");
var URL == window.location.pathname;
if (URL == "index.html#offers")
{
document.getElementById("autoiframe").src = "Kontakt.html";
}
}</script>
I don't understand why in second version alert stopped work (?). Ofcourse testing url also doesn't work. Where is a problem? What should I change? Thank you in advance. ;)
Aucun commentaire:
Enregistrer un commentaire