![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif) Code
var cell= document.createElement('td')
var nodetext = document.createTextNode('aaa');
cell.appendChild(nodetext);
var row = document.createElement('tr').appendChild(cell);
document.getElementById('table').appendChild(row);//添加行列
document.getElementById('table').setAttribute("className","sadf");//css
var btn = document.createElement('input');//添加HTML控件
btn.setAttribute('type','button');
document.getElementById('resultsBody').appendChild(btn);
var body = document.getElementById('resultsBody');//添加事件
body.onclick = function cik(){dos();};
发表于
2008-11-18 13:09
小昊
阅读( 145)
评论()
编辑
收藏
举报
|
|