这里有什么问题?
function setMaxLenght(textbox, length) {
var currentLength = textbox.value.length;
var minimum = Math.min(currentLength, length);
textbox.value = textbox.value.subString(0, minimum - 1);
}
当代码到达最后一行时,会抛出此错误:
Uncaught type error: Object 1 has no method 'subString'