chciałbym żeby otwierała mi sie dana strona dla danej rozdzielczości.
Napisałem taki skrypt ale nie działa gdyż cały czas otwierami plik 1920.html.
Proszę o pomoc.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AoE TEAM</title>
</head>
<body>
<script type="text/javascript">
if (screen.width < 1024) {
window.location = '1024.html';
}
if (screen.width < 1280) {
window.location = '1280.html';
}
if (screen.width < 1680) {
window.location = '1680.html';
}
if (screen.width < 1920) {
window.location = '1920.html';
}
else {
window.location = 'indexx.html';
}
</script>
</body>
</html> [ Dodano: 2011-01-26, 17:19 ]
Temat do zamknięcia.
Rozwiazanie:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AoE TEAM</title>
</head>
<body>
<script type="text/javascript">
if (screen.width < 1024) {
window.location = '1024.html';
}else{
if ((screen.width < 1280) && (screen.width >= 1024)) {
window.location = '1280.html';
}else{
if ((screen.width < 1680) && (screen.width >= 1280)) {
window.location = '1680.html';
}else{
if ((screen.width < 1920) && (screen.width >= 1680)) {
window.location = '1920.html';
}else{
window.location = 'indexx.html';
}
}
}
}</script>
</body>
</html>



This topic is locked

