const groupInput1 = document.getElementsByName('glassLeistung');
const output = document.getElementById('glassType');
const go = document.getElementById('go');
go.addEventListener("click", event => {
output.value=''
for (let i = 0; i < groupInput1.length; i++) {
if (groupInput1[i].checked) {
console.log(groupInput1[i].value);
output.value = output.value + groupInput1[i].value + ' '
}
}
})
<input type="checkbox" class="selected" id="glass" name="glassLeistung"
value="Glass" autocomplete="off">
<input type="checkbox" id="rahmen" class="selected" name="glassLeistung"
value="Rahmen" autocomplete="off">
<input type="checkbox" id="falzen" class="selected" name="glassLeistung"
value="Falzen" autocomplete="off">
<input type="text" name="glassType-420" value="" size="40" id="glassType" aria-invalid="false">
<button id="go">go</button>