может такой вариант устроит ? )))
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Add Field</title>
<style type="text/css">
.form250{
background-color: #EEE8AA;
}
.form2010{
background-color: #FFA500;
}
</style>
<script language="JavaScript" type="text/javascript">
function createEl(a, b) {
a = document.createElement(a);
for (var c in b) a[c] = b[c];
return a
};
function create_remove_block(a) {
var limit = 5;
if (!this.i) n = i = 0;
if (a && document.getElementById(a)) {
document.getElementById("div").removeChild(document.getElementById(a));
i--
} else if (i < limit) {
a = createEl("div", {
id: "alt" + n
});
var b = createEl("input", {
id: "alt_tags_" + n,
value: "alt_tags_" + n,
className: "form250"
});
a.appendChild(b);
b = createEl("input", {
type: "button",
value: "Delete",
className: "form2010",
onclick: function (c) {
return function () {
create_remove_block("alt" + c)
}
}(n)
});
a.appendChild(b);
document.getElementById("div").appendChild(a);
i++;
n++
}
};
window.onload = function(){
create_remove_block();
}
</script>
</head>
<body>
<h4>Add Field 5</h4>
<div id="div"></div>
<input type="button" class="form_button_100" value="Add Field" onclick="create_remove_block()" />
</body>
</html>