<html>
<script type="text/javascript" language="javascript">
    function ismaxlength(obj)
    { 
 alert(obj.value.length);
        var mlength=obj.getAttribute ? parseInt(obj.getAttribute("maxlength")) : "";
     if (obj.getAttribute && obj.value.length>mlength) 
     { 
         obj.value=obj.value.substring(0,mlength) 
     }
    } 
     
     
    function imposeMaxLength(obj)
    { 

        var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "";
        if(obj.value.length >= mlength)
  {
   obj.value=obj.value.substring(0,mlength) 
  }
  
  if(obj.value.length >512)
  {
   document.getElementById("show1024").value = obj.value.length;
  }
  else
  {
   document.getElementById("show512").value = obj.value.length;
  }

    }
</script>
<div>
<span style="width:480px;float:left;" ><input type="text" > fs </textarea>
</span>
</div>
</html>

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
猜你喜欢
  • 2021-10-14
  • 2021-11-25
  • 2022-02-07
  • 2022-12-23
  • 2021-07-15
  • 2021-10-05
  • 2021-08-31
相关资源
相似解决方案