<input type="text" id="txtCommand">
<script>
var blackList = ['go', 'nogo'];
document.getElementById("txtCommand").onkeyup = function() {
var expr = new RegExp(blackList.join('|'));
if (this.value.search(expr) !== -1) {
this.value = '';
}
}
</script>