От повторов строк избавился! Сортировка второй таблицы по id input - вопрос открытый, дайте совет
, пожалуйста!
<!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="http://yandex.st/jquery/1.4.4/jquery.min.js"></script>
<style>
div {
display: inline-block;
}
</style>
</head>
<body>
<script>
function addInput(ttt, ppp, nnn) {
var gval = ttt;
var gid = ppp;
var gn = nnn;
if (gval){
if (document.forms['form2'].elements[gid]) document.forms['form2'].elements[gid].value = gval;
else $("form[name=form2]").append(gn+'<input name="' + gid + '" id="' + gid + '" value="' + gval + '"><br>');
}
}
</script>
<div>
<form id="form1">
А<input type="text" id="Editbox1" name="Editbox1" value="" onblur="addInput(this.value, this.id, 'А')"><br>
Б<input type="text" id="Editbox2" name="Editbox2" value="" onblur="addInput(this.value, this.id, 'Б')"><br>
В<input type="text" id="Editbox3" name="Editbox3" value="" onblur="addInput(this.value, this.id, 'В')"><br>
Г<input type="text" id="Editbox4" name="Editbox4" value="" onblur="addInput(this.value, this.id, 'Г')"><br>
Д<input type="text" id="Editbox5" name="Editbox5" value="" onblur="addInput(this.value, this.id, 'Д')"><br>
Е<input type="text" id="Editbox6" name="Editbox6" value="" onblur="addInput(this.value, this.id, 'Е')"><br>
</form>
</div>
<div>
<form id="form2" name="form2"></form>
</div>
</body>
</html>