荷梅月剑 编程之路

这个世界没有偶然,有的只是必然
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

自定义验证控件的使用

Posted on 2007-08-14 14:32  荷梅月剑  阅读(238)  评论(0)    收藏  举报
<script type="text/javascript">    
   
function myvalidator(source, arguments)
        
//验证留言长度
    {
        
//var txtLength =document.getElementById("txtLeave").value;
        if(arguments.Value.length>100)
        {
            arguments.IsValid 
= false;
        }
        
else
        {
            arguments.IsValid 
= true;
        }
        
    }
</script>