<input ... onchange="contrapice(this);">

Nella head:
codice:
function contrapice(cc) {
  if(cc.value.match(/\'/) {
    alert("attenzione non puoi usarlo");
    cc.focus();
    return false;
  }
  return true;
}
nella parentesi del match:
slash backslash apice slash