<input type="file" name="af" size="25" maxlength="1"/>你这样再试试?

解决方案 »

  1.   


    <input type="file" name="af" size="25" maxlength="256"/>
    改为
    <input type="text" name="af" size="25" maxlength="256"/>
      

  2.   

    结论:maxlength对type=file无效,楼主是想用type=text的吧
      

  3.   

    eglic的办法虽然有点让人费解,但还是试了一下。结果还是无效。
      

  4.   

    不是,我就是想用type=file,不然也不会来问这个问题了。
      

  5.   

    <input type="text" name="textfield" maxlength="20">
      

  6.   

    if len(request("af"))>256 then
    response.write"超长"
    response.end
    end if
      

  7.   

    //<input type="file" name="af" size="25" maxlength="256"/>file也限制?用javascript试试!
      

  8.   

    <script language=javascript>
    function submit1()
    {
    if(form.af.value.length>256)
    {
    alert("超长!")
    return false
    }
    }
    </script>
      

  9.   

    还有,<form name="form" onsubmit=return(submit1())>