allow first two letters uppercase and remaining should numbers in onkeypress event

how can validate the text-box by using key-code by allow the text first two letter should be uppercase alphabets remaining all will be numeric . event should be done in on click event

  1. doing onkeypress event restrict the keys as follow. (i) allow only first two letters should be upper alphabets (ii) reaming will be numbers