ага, у меня тож ругается, но можно так:

Код:
function newTable() {
var tbl = document.createElement("table");
var bord = document.createAttribute('border');
bord.value = '1';
tbl.setAttributeNode(bord);
document.body.appendChild(tbl);
//alert(tbl.getAttribute('border'));
}
:)