jQuery inputfile 自定义按钮,可以删除选择好的内容

jQuery inputfile 自定义按钮,可以删除选择好的内容

 
jQuery inputfile 自定义按钮,可以删除选择好的内容

 

 

XML/HTML Code
  1. <div class="wrapper">  
  2. <div class="container">  
  3. <div class="panel">  
  4. <p> The plugin simpley replaces a file input with a button and gives you the ability to remove your selection easily </p>  
  5. <input type="file"/>  
  6. </div>  
  7. <div class="panel">  
  8. <p> You can also load a previously uploaded file and remove it </p>  
  9. <input type="file" data-value="http://www.google.es/" data-text="im_a_file.txt"/>  
  10. </div>  
  11. </div>  
  12. </div>  
  13.   
  14. <script src="jquery.inputfile.js"></script>  
  15. <script>  
  16.     $('input[type="file"]').inputfile({  
  17.         uploadText: '<span class="glyphicon glyphicon-upload"></span> Select a file',  
  18.         removeText: '<span class="glyphicon glyphicon-trash"></span>',  
  19.         restoreText: '<span class="glyphicon glyphicon-remove"></span>',  
  20.           
  21.         uploadButtonClass: 'btn btn-primary',  
  22.         removeButtonClass: 'btn btn-default'  
  23.     });  
  24. </script>  

 


原文地址:http://www.freejs.net/article_biaodan_222.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值