![]() |
allgemeine Frage zu JS
hallo.
irgendwo muss ein fehler stecken, da immer 1024 angezeigt wird :gruebel:
Code:
kann mir jemand sagen, was geändert werden muss damits funzt?
<script language="JavaScript">
<!-- function Aufloesung() { if(screen.width = 1024) window.location.href = "hp_1024.htm" else if(screen.width = 800) window.location.href = "hp_800.htm" else if(screen.width = 1280) window.location.href = "hp_1280.htm" else window.location.href = "hp_1024.htm" } // --> </script> thx |
Re: allgemeine Frage zu JS
hab selber die lösung des probs gefunden :wall:
bei jave muss ja beim vergleichen == schreiben, nicht nur =
Code:
<script language="JavaScript">
<!-- function Aufloesung() { if(screen.width == 1024) window.location.href = "hp_1024.htm" else if(screen.width == 800) window.location.href = "hp_800.htm" else if(screen.width == 1280) window.location.href = "hp_1280.htm" else window.location.href == "hp_1024.htm" } // --> </script> |
Re: allgemeine Frage zu JS
Wie in C/C++ auch. :wink:
|
Re: allgemeine Frage zu JS
Oder in PHP - den Fehler macht man einfach zu schnell,
wenn man auch mit Delphi proggt :) |
Re: allgemeine Frage zu JS
aber bitte java und javascript nicht verwechseln.
woki |
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:20 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz