JSFiddle - React, Tailwind, and code Playground
by Alexis LĂłpez Espinoza
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
Caja 1: <input type = "text" class = "ejemplo" data-link = "http://www.google.com" /> <br />
Caja 2: <input type = "text" class = "ejemplo" data-link = "http://www.bing.com" />
JavaScript
var availableTags = ["PHP", "JavaScript", "CSS", "jQuery"];
$( ".ejemplo" ).autocomplete({
source: availableTags
}).keypress(function(e){
if (e.keyCode == 13)
window.open(this.getAttribute("data-link") + "?q=" + this.value, "PopUp", "width=500, height=300");
});