<script>
var obj;
var action;
function flash()
{
obj.style.background=obj.style.background=="#ffffff"?"#0000dd":"#ffffff"
}function begin(id)
{
obj=document.getElementById(id);
window.clearInterval(action);
action=window.setInterval("flash()",300);
}
function stop(x,y)
{
if(obj!=null)
obj.style.background="#ffffff"
window.clearInterval(action);
}
</script>
<table id=tb border=1 width=300 height=100>
<tr><td id = "flash1">1</td><td>2</td><td>3</td></tr>
<tr><td id = "flash4">4</td><td>5</td><td>6</td></tr>
<tr><td id = "flash7">7</td><td>8</td><td>9</td></tr>
</table>
<input type="button" value="开始" onclick="begin('flash4')">
<input type="button" value="停止" onclick="stop()">
var obj;
var action;
function flash()
{
obj.style.background=obj.style.background=="#ffffff"?"#0000dd":"#ffffff"
}function begin(id)
{
obj=document.getElementById(id);
window.clearInterval(action);
action=window.setInterval("flash()",300);
}
function stop(x,y)
{
if(obj!=null)
obj.style.background="#ffffff"
window.clearInterval(action);
}
</script>
<table id=tb border=1 width=300 height=100>
<tr><td id = "flash1">1</td><td>2</td><td>3</td></tr>
<tr><td id = "flash4">4</td><td>5</td><td>6</td></tr>
<tr><td id = "flash7">7</td><td>8</td><td>9</td></tr>
</table>
<input type="button" value="开始" onclick="begin('flash4')">
<input type="button" value="停止" onclick="stop()">
解决方案 »
- jquery,ext,mootool等流行框架的选择器性能比较
- 如何实现这样的特效呢。左右推拉切换
- JS项目如何进行性能分析
- 正确显示层的位置
- 多选日期的日历问题,选择多个日期后得不到日期。急急急急
- document.documentElement.offsetWidth | scrollLeft 在ie,ff中有区别吗
- 如何打开"打开文件对话框"和"颜色对话框"?
- 请教js解密与解密的问题
- 请问大家我用frameset可以分为上下中三部分吗?
- 用form提交数据----只提交表格的一个CELL中的值,如何实现啊!
- 求一正则表达式
- 阿信网站上提供的那个XPMENU下载不了,出现网易的错误页面,谁给个下载地址,谢谢!
function begins(){
begin(0,0);
begin(1,2);
begin(2,1);
......
}<input type="button" value="开始" onclick="begins()">