﻿function ismaxlength(obj)
{
    var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
    if (obj.getAttribute && obj.value.length>mlength)
    {
        obj.value=obj.value.substring(0,mlength)
        window.alert("你輸入的字數已超過限制")
    }
}
