1<input type="text" class="form-control" placeholder="Search" id="search_id"/>
2<script type="text/javascript">
3const log = document.getElementById('search_id');
4document.addEventListener('keyup', logKey);
5function logKey(e) {
6 const value=log.value;
7 if (e.key === 'Enter' || e.keyCode === 13) {
8 transmit({search: value});
9 }
10};
11</script>