<input class='Autocomplete' />

<textarea id='output'></textarea>
.Autocomplete {
  margin: 1rem;
}

textarea {
  display: block;
  margin: 1rem;
  height: 10rem;
  width: 22.3rem;
}
View Compiled
var output = document.getElementById('output');

document.querySelector('.Autocomplete')
  .addEventListener('input', _.debounce(function(e) {
    // Make Ajax call for autocomplete 
    output.value += 'Autocomplete: ' + e.target.value + '\n'; 
  }, 500));

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js