ボタンのテキストを変更する方法? 質問する

ボタンのテキストを変更する方法? 質問する
<input type="file" value="Browse" name="avatar" id="id_avatar" />

を変更しようとしましたvalueが、機能しません。ボタンのテキストをカスタマイズするにはどうすればよいですか?

ベストアンサー1

使用Bootstrap ファイルスタイルフォームのファイルフィールドのスタイルを設定するために使用します。これは、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.">

おすすめ記事