日期:2014-05-16 浏览次数:20389 次
<script type="text/javascript">
var count = 0;
$(function(){
setInterval("startRequest()",2000);
})
function startRequest(){
if(count % 2 == 0){
$('#all').css('background-color','red');
}else{
$('#all').css('background-color','yellow');
//clearInterval(o);
}
count++;
}
</script>
</head>
<body>
<div id="all" style="width: 100px; height: 20px;">
</div>
</body>
</html>