|
|
|
| Привет.. вот проблема:
как мне сделать, чтобы на сервере лежало несколько файлов с flash и при одном разрешении экрана загружался один файл, аа при другом другой..
например при разрешении 1280*1024 один файл, а при 1024*768 другой
типа оптимизация ?? | |
|
|
|
|
|
|
|
для: ZetRider
(11.04.2006 в 21:24)
| | Это уже Javascript
<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='http://www.test.ru/640_480.php'
}
if (res=='2')
{
window.location='http://www.test.ru/800_600.php'
}
if (res=='3')
{
window.location='http://www.test.ru/1024_768.php'
}
if (res!='1' && res!='2' && res!='3')
{
window.location='http://www.test.ru/default.php'
}
</script>
можно include'ами работать например: document.write('<?include('default.php');?>'); вместо window.location
|
| |
|
|
|