为什么通过其他控件调用它的CLICK()功能,看起来是选好了要上传的文件,但实际上不能上传?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~不懂

解决方案 »

  1.   

    <?php
    if($up_picture_size>0)
    {
    $tmp="./mypicture".$photo;
    if (!copy($up_picture, $tmp))
    {
    print("复制文件 $tmp 失败...<br>\n");
    }
    else
    {
    unlink($up_picture); 
    }

    }
    ?>
    <html>
    <head>
    <title>upload picture</title>
    <script language="javascript1.2">
    function photo_change()
    {
    var fromidx,filename=document.form1.up_picture.value;
    fromidx=filename.lastIndexOf('.');
    if(fromidx!=-1)
    {
    document.form1.photo.value=filename.substring(fromidx,filename.length);
    }
    else
    {
    document.form1.up_picture.value='';
    }
    }
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body topmargin="0" leftmargin="0" >
    <form name='form1'  method="post" ENCTYPE = "multipart/form-data">  <input type="file" name="up_picture" size="10" value='' style=" VISIBILITY: hidden;">
      <INPUT TYPE = "hidden" NAME = "MAX_FILE_SIZE" VALUE ="1000000"> 
      <input type="hidden" name="photo" value=''>
      <a href='#' onclick="javascript:up_picture.click();photo_change();"> 照 片</a>
      <input type="submit" name="save" value="确定" >
      <input type="reset" name="cancel" value="取消" >
    </form>    
    </body>
    </html>
      

  2.   

    上面是从程序中提取的部份代码,可能看着会不太舒服喔,  其中PHOTO只保存上传文件的扩展名,
      

  3.   

    还有,不知哪位老兄知道哪儿有好的HTML标准或HTML手册之类的资料下载?
      

  4.   

    HTML标准你到w3c看看
    www.w3.org