Сообщение от ksa
|
Делай полный тестовый пример...
|
К примеру вот такой полный тестовый пример:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type='text/css'>
.PantoneArea {width:500px;height:500px;padding:0px;margin:0 10px 5px 0;float:left;position:relative;}
.PantoneArea1 {position:absolute;top:0px;left:0px;width:250px;height:250px;padding:0;margin:0;}
.PantoneArea2 {position:absolute;top:0px;left:250px;width:250px;height:250px;padding:0;margin:0;}
.PantoneArea3 {position:absolute;top:250px;left:250px;width:250px;height:250px;padding:0;margin:0;}
.PantoneArea4 {position:absolute;top:250px;left:0px;width:250px;height:250px;padding:0;margin:0;}
.PantoneList1 {position:absolute;top:220px;left:40px;}
.PantoneList2 {position:absolute;top:220px;left:40px;}
.PantoneList3 {position:absolute;top:10px;left:40px;}
.PantoneList4 {position:absolute;top:10px;left:40px;}
</style>
</head>
<body>
<script language="JavaScript" type='text/javascript'>
function SelectPantone() {
Area1.backgroundColor = Pantone1.value;
Area2.backgroundColor = Pantone2.value;
Area3.backgroundColor = Pantone3.value;
Area4.backgroundColor = Pantone4.value;
}
</script>
<div ID='ColorArea' class='PantoneArea'>
<div ID='Area1' class='PantoneArea1'>
<select ID='Pantone1' class='PantoneList1' onChange='SelectPantone()'>
<option value='#fadf00'>Process Yellow
<option value='#d7006c'>Process Magenta
<option value='#009dd9'>Process Cyan
<option value='#191919'>Process Black
</select>
</div>
<div ID='Area2' class='PantoneArea2'>
<select ID='Pantone2' class='PantoneList2' onChange='SelectPantone()'>
<option value='#fadf00'>Process Yellow
<option value='#d7006c'>Process Magenta
<option value='#009dd9'>Process Cyan
<option value='#191919'>Process Black
</select>
</div>
<div ID='Area3' class='PantoneArea3'>
<select ID='Pantone3' class='PantoneList3' onChange='SelectPantone()'>
<option value='#fadf00'>Process Yellow
<option value='#d7006c'>Process Magenta
<option value='#009dd9'>Process Cyan
<option value='#191919'>Process Black
</select>
</div>
<div ID='Area4' class='PantoneArea4'>
<select ID='Pantone4' class='PantoneList4' onChange='SelectPantone()'>
<option value='#fadf00'>Process Yellow
<option value='#d7006c'>Process Magenta
<option value='#009dd9'>Process Cyan
<option value='#191919'>Process Black
</select>
</div>
</div>
</body>
</html>