zhouerba

方法1:<input type="file"/>

方法2:效果等同于方法1

<input type="button" value="选择文件" />
<input type="file" style="display: none;" />
显示选择文件路径:<input type="text" />

 

<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
 
 <script type="text/javascript">
     $(document).ready(function() {
        $(":button").click(function() {
         $(":file").click();
         $(":text").val($(":file").val());
        });
      });
</script>

 

分类:

技术点:

相关文章:

  • 2021-09-29
  • 2021-09-08
  • 2021-09-25
  • 2021-12-13
  • 2021-12-13
  • 2021-12-13
  • 2018-06-14
猜你喜欢
  • 2021-11-17
  • 2021-09-29
  • 2021-09-29
  • 2021-11-27
  • 2021-11-27
  • 2021-11-17
  • 2021-11-27
相关资源
相似解决方案