פורסם 2007 ביולי 2618 שנים אהלן !אני רוצה לומר לדפדפן שיצבע את הקישור "בלה בלה" בצבע אדום , ע"פ המיקום שלו.נגיד אם הבן אדם נמצא ב default אז הוא יהיה בצבע אדום,למשל.כרגע סתם הצבתי את הכתובת ידנית...רק כדי לראות אם זה עובד אבל זה לא ! :סonLoad = yaba() { function pages() { return "file:///C:/Guy/Site2/Deafult.html"; } function yaba() { if (document.location.href == pages()) { alert('k its fine') grund = document.getElementById("s") grund.style.color = "red" } else {alert('the url is '+document.location.href)} }}וכמובן ב html יש:<div class="details" ><a href=""><p id="s">ContactUs</p></a></div>תודה רבה על העזרה! :}
פורסם 2007 ביולי 2618 שנים <html><body onLoad="yaba();"> <div><a href="" id="s">ContactUs</a></div></body></html><script>function pages() { return "file:///C:/Guy/Site2/Deafult.html";}function yaba() { var myURL = document.location.href; var myPage = pages(); if (myURL.toLowerCase() == myPage.toLowerCase()) { alert('k its fine'); grund = document.getElementById("s"); grund.style.color = "red"; }else{ alert('the url is '+document.location.href); }}</script>
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.