Сообщение от MSos0506
|
К примеру вот такой полный тестовый пример:
|
Уже лучше!
Как вариант...
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<!--
<link rel="stylesheet" type="text/css" href="tmp.css" />
-->
<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>
<script type="text/javascript">
function clr(Obj){
Obj.parentNode.style.backgroundColor=Obj.value;
};
</script>
</head>
<body>
<div ID='ColorArea' class='PantoneArea'>
<div ID='Area1' class='PantoneArea1'>
<select ID='Pantone1' class='PantoneList1' onChange='clr(this);'>
<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='clr(this);'>
<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='clr(this);'>
<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='clr(this);'>
<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>