Как вариант...
<!DOCTYPE html>
<html>
<head>
<!--
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" type="text/css" href="tmp.css" />
-->
<style type="text/css">
</style>
<script type="text/javascript">
function test1() {
var bl = document.getElementById('test');
var bt1 = document.createElement("button");
bt1.setAttribute("type", "button");
bt1.onclick=test2;
var tn1 = document.createTextNode("Button 2");
bt1.appendChild(tn1);
bl.appendChild(bt1);
}
function test2() {
var bl = document.getElementById('test1');
var bt1 = document.createElement("button");
bt1.setAttribute("type", "button");
bt1.onclick=test3;
var tn1 = document.createTextNode("Button 3");
bt1.appendChild(tn1);
bl.appendChild(bt1);
}
function test3() {
alert('Ok');
}
</script>
</head>
<body>
<table>
<tr>
<td>
<button type="button" onclick="test1();">Button 1</button>
</td>
<td id="test"></td>
<td id="test1"></td>
</tr>
</table>
</body>
</html>