在angularJs

时间:2017-09-27 10:55:21

标签: html css angularjs angular-ui-bootstrap

我正在尝试在angularJs中将输入加载项按钮作为文件附件按钮。 html代码显示按钮"添加文件"单击时必须打开文件浏览窗口,其行为与。

相同

用于创建input-addon的代码:

    <div class="form-group">
                            <label class="col-sm-4 col-md-3 col-lg-3 control-label informationCollect">Attachments</label>
                            <div class="col-sm-6 col-lg-6 col-md-3">
                                <div class="input-group">
                                    <input class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button"><span>Add File</span></button>
                                    </span>
                                </div>
                            </div>
                        </div>

1 个答案:

答案 0 :(得分:0)

这是你在找什么?

&#13;
&#13;
<label for="fileInput" class="btn btn-secondary">
  Add File
</label>
<input type="file" style="display: none"  id="fileInput" />
&#13;
&#13;
&#13;