Программирование > JavaScript & JScript

1024 и 800

(1/1)

listopad:
Люди добрые помогите.......
нужен скрипт на JS .....  его задачи . Посетитель заходит на главную страницу, скрипт распознает разширение его экрана и перенаправляет..в определенное место  !!!




Буду очень благодарен !!!!!!

mike:
Ищи на форуме. Много раз уже было, причем последний раз совсем недавно.

Wolf:

if (screen.width= 1024x..."}


Можно раздробить таким же путем на большее кол-во ссылок.

Wolf:
Вот олагодаря статье Oak\'а налабал небольшой примерчик (правда только для IE, кто и для других браузеров переделает, кидайте сюда) - пример наглядно показывает осн. необходимые параметры!!!





function hlp()
{
myWin= open("", "statWindow", "width=200,height=450,status=no,toolbar=no,menubar=no,alwaysRaised=yes");
myWin.document.open();
myWin.document.write("width= "+window.screen.width+"
");
myWin.document.write("height= "+window.screen.height+"
");
myWin.document.write("pixelDepth= "+window.screen.pixelDepth+"
");
myWin.document.write("colorDepth= "+window.screen.colorDepth+"
");
myWin.document.write("availWidth= "+window.screen.availWidth+"
");
myWin.document.write("availHeight= "+window.screen.availHeight+"
");
myWin.document.write("availLeft= "+window.screen.availLeft+"
");
myWin.document.write("availTop= "+window.screen.availTop+"
");
myWin.document.write("
");
myWin.document.write("clientHeight= "+window.document.body.clientHeight+"
");
myWin.document.write("clientLeft= "+window.document.body.clientLeft+"
");
myWin.document.write("clientTop= "+window.document.body.clientTop+"
");
myWin.document.write("clientWidth= "+window.document.body.clientWidth+"
");
myWin.document.write("offsetHeight= "+window.document.body.offsetHeight+"
");
myWin.document.write("offsetLeft="+window.document.body.offsetLeft+"
");
myWin.document.write("offsetParent= "+window.document.body.offsetParent+"
");
myWin.document.write("offsetTop= "+window.document.body.offsetTop+"
");
myWin.document.write("offsetWidth= "+window.document.body.offsetWidth+"
");
myWin.document.write("scrollHeight= "+window.document.body.scrollHeight+"
");
myWin.document.write("scrollLeft= "+window.document.body.scrollLeft+"
");
myWin.document.write("scrollTop= "+window.document.body.scrollTop+"
");
myWin.document.write("scrollWidth= "+window.document.body.scrollWidth+"
");
myWin.document.close();
myWin.focus();
}






при загрузки или изменении размера страници вычисл. размеры, и т.д. -делайте выводы!!!

Навигация

[0] Главная страница сообщений

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
Перейти к полной версии