I'm using the following code and it works fine by clicking on the search button. But how can I also search using the enter key?
Code:
<script>
function mySearch() {
  var text = document.getElementById('strSearchText').value;
  var url = "privatelink=" + text;
  window.open(url,'_blank');
}
</script><style>
button:hover {color:red;}
.rounded-corners {
    -moz-border-radius: 20px;
    -webkit-border-radius: 20px;
    -khtml-border-radius: 20px;
    border-radius: 20px;
    white-space:normal;
    font-weight:bold;
    width: 50%;
}
.smallbutton {
    -moz-border-radius: 20px;
    -webkit-border-radius: 20px;
    -khtml-border-radius: 20px;
    border-radius: 20px;
    white-space:normal;
    font-weight:bold;
    width: 20%;
}
</style><br>
<input type="text" size="25" tabindex="1" value="" id="strSearchText"> 
<button class="smallbutton" onclick="mySearch();"><span style="DISPLAY: inline-block">Search</span></button> 
    