I have the following code, but the var ob
is coming null.
<head>
<script>
function pisca(item) {
var ob = document.getElementById(item);
if (ob.style.color=="red"){
ob.style.color="black";
}else{
ob.style.color="red";
}
}
</script>
</head>
<body>
<div id="piscar" style="color:#F00">
Texto piscando
</div>
<script>
t = setInterval("pisca('piscar')",500);
</script>
</body>