i need blink all div with blink id
how to this?
this is my code
<html>
<body>
<div id="blink" style="background-color: #ffff00;display: inline;padding: 5px;">WARNING</div>
<div id="blink" style="background-color: #ffff00;display: inline;padding: 5px;">WARNING</div>
<div id="blink" style="background-color: #ffff00;display: inline;padding: 5px;">WARNING</div>
<script type="text/javascript">
var i = 1,timer;
window.onload=function() {
timer = setInterval('blink()', 500);
}
function blink() {
if (i == 1) {
document.getElementById('blink').style.backgroundColor = '#ff0000';
} else {
document.getElementById('blink').style.backgroundColor = '#ffff00';
}
if(i == 1) i = 0; else i = 1;
}
//alert(document.getElementsByTagName('div').length);
</script>
</body>
</html>
in this code 3 div, but i have more 20 div in a page,
help me please
thank you


Sign In
Create Account


Back to top









