我读了很多关于如何删除NO file selected
文本的讨论。删除没有根据条件选择的文件
我发现这招做的工作,但我需要的东西有点不同:
<style type="text/css">
input[type='file'] {
color: transparent;
}
</style>
<input type="file" />
我需要NO file selected
以根据if
条件被删除
喜欢的东西if there is a value
然后取出没有选择文件,否则添加它。
@if (Model.value != null)
{
Remove the no file chosen
}
else
{
Add the no File chosen
}
这可能吗?我用MVC5项目...
可能重复[我怎样才能把一个文件输入“无文件选择”工具提示中Chrome?](http://stackoverflow.com/questions/12035400/how-can-i-remove-the-no-file-chosen-tooltip-from-a-file-input-in-chrome) – undefined
@ undefined-没有它,因为我已经阅读它,而不是基于条件... –
添加一个条件不是很难(如果这是唯一的问题)。 – undefined