<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script type="text/javascript" language="javascript">
var trow;
function init()
{
trow = 2;
}
function addAttachment()
{
var tbodyElem = document.getElementById("TBody");
var trElem, tdElem, txtNode, tmpString;
if(trow<=11)
{
trElem = tbodyElem.insertRow(trow);
tdElem = trElem.insertCell(0);
tdElem.className = "gradient";
tdElem.setAttribute("style", "text-align: right;");
txtNode = document.createTextNode("Поле " + (trow - 1) + ":");
tdElem.appendChild(txtNode);
tdElem = trElem.insertCell(1);
tdElem.className = "gradient";
tdElem.setAttribute("style", "text-align: left;");
tdElem.setAttribute("colspan", "1");
var input = document.createElement("INPUT");
input.setAttribute("type", "text");
input.setAttribute("name", "scr" + (trow - 1));
input.setAttribute("size", "60");
input.setAttribute("value", "");
input.setAttribute("id", "scr" + (trow - 1));
tdElem.appendChild(input);
trow++;
}
}
</script>
</head>
<body body onload="init()">
<form method="post" action="">
<table border="1" id="TBody">
<tr>
<td colspan="2">
<input type="button" name="q" value="Добави поле" onclick="addAttachment()">
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Изпрати"></td>
</tr>
</table>
</form>