<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Тест</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
</head>
<body>
<script type="text/javascript">
var total = 0;
function add_new_image(){
total++;
$('<tr>')
.attr('id','tr_image_'+total)
.css({lineHeight:'20px'})
.append (
$('<td>')
.attr('id','td_title_'+total)
.css({paddingRight:'5px',width:'200px'})
.append(
$('<input type="text" />')
.css({width:'200px'})
.attr('id','input_title_'+total)
.attr('name','input_title_'+total)
.attr('placeholder','Кол-во')
)
)
.append (
$('<td>')
.attr('id','td_title_2_'+total)
.css({paddingRight:'5px',width:'200px'})
.append(
$('<input type="text" />')
.css({width:'200px'})
.attr('id','input_title_2_'+total)
.attr('name','input_title_2_'+total)
.attr('placeholder','Стоимость')
)
)
.append (
$('<td>')
.css({width:'60px'})
.append (
$('<span id="progress_'+total+'" class="padding5px"><a href="#" onclick="$(\'#tr_image_'+total+'\').remove();" class="ico_delete"><img src="delete.png" alt="del" border="0"></a></span>')
)
)
.appendTo('#table_container');
}
$(document).ready(function() {
add_new_image();
});
</script>
<form action="add.php" method="post">
<table id="table_container">
<tr>
<td width="100px" colspan="2"><strong>Выбор</strong></td>
</tr>
</table>
<br/>
<input type="button" value="Добавить поле" id="add" onclick="return add_new_image();">
<input type="submit" value="Отправить">
</form>
</body>
</html>