The correct thing (if it were a validation) would be to put it in the blur event:
window.addEventListener('load', function(){
pcart.addEventListener('blur', function(){
if(parseInt(this.value,10) != 100){
alert("debe valer 100");
this.focus();
}
});
});
This also has some problems, and is that if the user will not be able to leave the page without changing the value (or not naturally).
The ideal would be to put a text next to it and only focus the first time or if the value changed. You have to pay attention to the user experience.