📅  最后修改于: 2022-03-11 15:01:10.562000             🧑  作者: Mango
function limit(element)
{
var max_chars = 2;
if(element.value.length > max_chars) {
element.value = element.value.substr(0, max_chars);
}
}