Показать сообщение отдельно
  #6 (permalink)  
Старый 20.07.2012, 20:14
Аватар для lord2kim
Профессор
Отправить личное сообщение для lord2kim Посмотреть профиль Найти все сообщения от lord2kim
 
Регистрация: 03.05.2011
Сообщений: 848

liber87, можно попробовать так, если используются простые текстовые поля
<html>
<head>
<title></title>
<script>
function a(event) {
    var e = event || window.event;
    e = e.target || e.srcElement;
    var i=0;
    var el = document.getElementsByTagName("input");
    for (i=0; i < el.length; i++) {
       if (el[i] == e) {
         break;
      }
   }
	el[i+1].value = document.getElementsByName("sel")[0].value + " " + document.getElementsByName("sel")[1].value + " " + document.getElementsByName("sel")[2].value;
}
</script>
</head>
<body>
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<select name="sel"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select>
<select name="sel"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select>
<select name="sel"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select>
<input type="button" value="asdasd" onClick="a(event)">
<input type="text" name="asd"><input type="text" name="asd"><input type="text" name="asd"><input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
<input type="text" name="asd">
</body>
</html>

Deff наверняка решение получше придумает...

Последний раз редактировалось lord2kim, 20.07.2012 в 20:21.
Ответить с цитированием