Это в настоящее время работает, но кажется слишком тяжелым. Есть ли лучший способ написать это?Javascript получить значение от ввода
onmouseup="Userinfo(document.getElementById('name').value)"
<div class="search" style="position: absolute; z-index: 3;top:50px;left:250px;line-height:2.5;">
<a>Search: </a><input name="name" id="name" type="text" autocomplete="off" autofil="off" autocapitalize="off" class="form-control input-lg" style="height:30px; border-radius:6px; width:500px; left: 70px;position:absolute"><a href="javascript:hidesearch()"><img id="srcclr" style="position: absolute; left: 540px; top: 8px;display:none;" src="img/clear.png" width=25/></a>
<div id="go" onmouseup="Userinfo(document.getElementById('name').value)" onmouseover="this.style.background='#4A9E75';" onmouseout="this.style.background='#6DD09F';" style="height: 30px; width: 60px; background-color: #6DD09F; position: absolute; left: 600px; top: 5px; border-radius: 8px; text-align: center; color: white; line-height: 2; font-family: helvetica,sans-serif;cursor: default;">Go!</div>
<br>
</div>
в основном Theres ввода текста и рядом с ним Theres в Див, действующем в качестве кнопки «Go» и при нажатии на активирует функцию Userinfo с входными значениями
добавить еще несколько деталей –
Добро пожаловать на SO! Вы можете улучшить свой, добавив немного больше кода, а также описание того, чего вы пытаетесь достичь и т. Д. ... – MBaas