View Single Post
Eski 10/09/2007, 19:57   #5 (permalink)
Lisans
İptal Durumu
 
Üyelik Tarihi: 01/2007
Mesaj: 354
Varsayılan

<script>
function Slot(){
var element = document.getElementById('secenek_alan');
var div = document.createElement("div");
div.innerHTML = '<div style="height:10px;"><input type="text" name="secenek[]" id="colorfield'+id+'" onFocus="ddcolorposter.echocolor(this, \'colorbox'+id+'\')" onblur="test(colorbox'+id+');" style="float:left;"><div id="colorbox'+id+'" class="colorbox" style="width:35px; height:19px; background-color:#fff; float:left;"></div></div><br />';
element.appendChild(div);
id++;
}
</script>


<form name="forum" method="get" action="">
<div id="secenek_alan">
<div style="height:10px;">
<input type="text" name="secenek[]" id="colorfield1" onFocus="ddcolorposter.echocolor(this, 'colorbox1');" onblur="test('colorbox1');" style="float:left;">
<div id="colorbox1" class="colorbox" style="width:35px; height:19px; background-color:#fff; float:left;"></div>
</div><br />
<div style="height:10px;">
<input type="text" name="secenek[]" id="colorfield2" onFocus="ddcolorposter.echocolor(this, 'colorbox2')" onblur="test('colorbox2');" style="float:left;">
<div id="colorbox2" class="colorbox" style="width:35px; height:19px; background-color:#fff; float:left;"></div>
</div><br />
</div>
<input type="submit" value="Gönder" />
</form>

şöyle bir şey geldi aklıma aslında ama şu an çalışmıyor nedense onFocus'a koyunca kodu çalışıyor

<script type="text/javascript">
var a = new Array();
function test(val){
a[val] = document.getElementById(val).style.backgroundColor ;
}
function ale(){
for(x in a){
alert(a[x]);
}
}
</script>
Lisans hatta değil   Alıntı Yaparak Yanıtla