<script>
var container=document.getElementById("Test"); //获取容器div的引用
var _table=document.createElement("table"); //创建表格对象
_table.setAttribute("border","1");//设置表格属性
_table.setAttribute("cellspacing","0");
_table.setAttribute("cellpadding","1");
_table.setAttribute("id","lcdbox");
for(var r=0;r<32;r++)//创建行
{
var _tr=_table.insertRow(r);
for(var d=0;d<64;d++)//创建列
{
var _td=_tr.insertCell(d);
_td.setAttribute("bgcolor",bg_color);
}
}
container.appendChild(_table); //将表格显示于页面
</script>
JS写一个LED显示屏
最新推荐文章于 2024-01-21 18:00:00 发布