Hello!
I am coding a new HTML form that will collect upon many more items a state abbreviation (i.e. “ks”). Right now I have the -input field- limited so it only allows 2 characters. That doesn’t keep visitors from entering something random into the field like “SS”.
I am wanting a code that allows me to limit what can be placed in that field to only USA’s official state abbreviations.
I am using HTML, CSS, and Javascript so far in my website. Thank you for all your help and ideas!!
Update. Added all states, uppercase handling and jsfiddle link.
Here is a pure javascript implementation, should give you an idea of what you need to do:
See it working live here : http://jsfiddle.net/k7QQs/