Cześć!
Mam problem chce zmienić wielkość i pozycje mojego image pilka.jpg wykorzystując Timer.
Timer działa jeśli z kodu pozbędziemy się tego (IMG:
style_emoticons/default/smile.gif) Jednak ja chce wykonać działania na image (IMG:
style_emoticons/default/smile.gif)
<img src="pilka.jpg" name ="cos"/>
document.getElementByName('cos').style.height=c;
Mój cały kod
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2"> <meta name="Description" content=" [wstaw tu opis strony] "> <meta name="Keywords" content=" [wstaw tu slowa kluczowe] "> <meta name="Author" content=" [dane autora] "> <meta name="Generator" content="kED2">
<link rel="stylesheet" href=" [nazwa_arkusza_stylow.css] " type="text/css"> <body onload ="doTimer()"> <script language ="javascript" type "text/javascript">
var c=0;
var t;
var timer_is_on=0;
function timedCount()
{
c=c+1;
document.getElementById('wooYayMessage').innerHTML= c.toString();
document.getElementByName('cos').style.height=c;
t=setTimeout("timedCount()",1000);
}
function doTimer()
{
if (!timer_is_on)
{
timer_is_on=1;
timedCount();
}
}
<div id ="wooYayMessage" style="height: 1.5em font-size: 2em; color:red">
<img src="pilka.jpg" name ="cos"/>