Ga naar inhoud

Misschien een domme vraag, maar is dit script goed????


Aanbevolen berichten

Ik heb voor mijn website het volgende script gevonden op internet: [i:6ffd942bd2]<script> var width = screen.width; var res=(((!(640-width))*1) +((!(800-width))*2) +((!(1024-width))*3) +((!(1152-width))*4) +((!(1280-width))*5) +((!(1600-width))*6)); if(!(res)) res = 1; if (res=='1') {window.location='640.htm'} if (res=='2') {window.location='800.htm'} if (res=='3') {window.location='1024.htm'} if (res!='1' && res!='2' && res!='3') {window.location='rest.htm'} </script> [/i:6ffd942bd2] Maar voor mijn website heb ik een versie gemaakt voor de resolutie 800x600 en 1024x768. Ik heb dus bepaalde regels eruit moeten halen. Maar dit script werkt niet goed. Wat is aan het volgende script fout: [i:6ffd942bd2]<script> var width = screen.width; var res=(((!(800-width))*1) +((!(1024-width))*2) +((!(1152-width))*3) +((!(1280-width))*4) +((!(1600-width))*5)); if(!(res)) res = 1; if (res=='1') {window.location='800.html'} if (res=='2') {window.location='1024.html'} if (res!='1' && res!='2') {window.location='1024.html'} </script> [/i:6ffd942bd2] Alvast bedankt!
Link naar reactie
als je eens de search zou gebruiken, of zelfs een aantal topics naar beneden scrollendan vind je dit: http://forum.computertotaal.nl/phpBB2/viewtopic.php?t=62607 daarin staat al een script wat je kan gebruiken. Ik heb er even dit van gemaakt: [code:1:c4bd18e405] <script language="Javascript"> if (screen.width < 1024) { window.location = "800.htm"; } else { window.location = "1024.htm"; } </script> [/code:1:c4bd18e405] t.
Link naar reactie

Om een reactie te plaatsen, moet je eerst inloggen

Gast
Reageer op dit topic

×   Geplakt als verrijkte tekst.   Herstel opmaak

  Er zijn maximaal 75 emoji toegestaan.

×   Je link werd automatisch ingevoegd.   Tonen als normale link

×   Je vorige inhoud werd hersteld.   Leeg de tekstverwerker

×   Je kunt afbeeldingen niet direct plakken. Upload of voeg afbeeldingen vanaf een URL in

×
×
  • Nieuwe aanmaken...