<div>
<select>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select>
<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="click" class="but">
<input>
</div>
<div>
<select>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select>
<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="click" class="but">
<input>
</div>
<script>
window.onload = function () {//onload begin
document.body.onclick = function (e) {//onclick begin
e = e || event;
var target = e.target || e.srcElement;
if (target.className == 'but') {
var sel = target.parentNode.getElementsByTagName('select');
var len = sel.length;
var inp = target.nextSibling.nextSibling;//target.nextElementSibling
inp.value = '';
for (var i = 0; i < len; i++) {
inp.value += sel[i].value + '; ';//inp.value += sel[i].options[sel[i].selectedIndex].text + '; ';
}
}
}//onclick end
}//onload end
</script>