的按钮文字?-6ren"> 的按钮文字?- 我试图修改 value,但它不起作用。如何自定义按钮文字? 最佳答案 使用 Bootstrap FileStyle ,用于对表单的文件字段进行样式设置。它是一个名为 Twitter Bootstra-6ren">
gpt4 book ai didi

html - 如何更改<input type ="file"/>的按钮文字?

转载 作者:IT老高 更新时间:2023-10-28 11:03:56 33 4
gpt4 key购买 nike

<input type="file" value="Browse" name="avatar" id="id_avatar" />

我试图修改 value,但它不起作用。如何自定义按钮文字?

最佳答案

使用 Bootstrap FileStyle ,用于对表单的文件字段进行样式设置。它是一个名为 Twitter Bootstrap 的基于 jQuery 的组件库的插件

示例用法:

包括:

<script type="text/javascript" src="js/bootstrap-filestyle.min.js"> </script>

通过 JavaScript:

$(":file").filestyle();

通过数据属性:

<input type="file" class="filestyle" data-classButton="btn btn-primary" data-input="false" data-classIcon="icon-plus" data-buttonText="Your label here.">

关于html - 如何更改&lt;input type ="file"/>的按钮文字?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1944267/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com