【发布时间】:2018-01-08 09:05:48
【问题描述】:
我是angularjs 的新手。实际上,在发布这个问题之前,我已经搜索了很多,我发现了这个问题的不同答案,但没有一个对我有用。所以,我也尝试了css。我在这里使用input type="file",为此我的代码就像-
<div class="btn btn-info btn-labeled file-preview-input" ng-disabled="isSingleFileSelected">
<span class="glyphicon glyphicon-folder-open"></span>
<span class="file-preview-input-title">BrowseFolder</span>
<input type="file" ng-click="clearFileName()" id="uploadId" webkitdirectory directory multiple file-upload="myFile" accept=".txt, .rtf, .pdf, .doc, .docx, .rtx, .odt, .sxw, .wpd, .odf"
name="input-file-preview" />
</div>
<div class="btn btn-info btn-labeled file-preview-input" ng-disabled="isFolderSelected">
<span class="glyphicon glyphicon-file"></span>
<span class="file-preview-input-title">BrowseFile</span>
<input type="file" ng-click="clearFileName()" file-upload="myFile" accept=".txt, .rtf, .pdf, .doc, .docx, .rtx, .odt, .sxw, .wpd, .odf" name="input-file-preview"
/>
</div>
现在在这段代码中我有一些变量,比如 -isSingleFileSelected 在此基础上我启用和禁用。现在我想要一个tooltip,即使它被禁用。所以,在这里我尝试在输入类型上添加ng-disabled,但用户可以点击该字段,它被禁用但仍然。所以,我在 div 本身上添加了ng-disabled,所以现在user is not able to click input type 但不是能够显示 to enable this do this 的工具提示。任何人都可以在这里帮助我。提前致谢。
【问题讨论】:
标签: javascript jquery html css angularjs