The field content is always treated like a string even if its a number.
Therefors you can use string function to check the length of the number, ie, that it's six digits long and you can check that the sub-string, ie, the first character is one of the required numbers.
You need a combination of:
var checkStr = new String(document.getElementById('fieldID').value);
checkStr.length == 6;
checkStr.charAt(checkStr.0) == 1;
and so forth.