我正在使用带有Jasny fork的 Bootstrap 。我正在开发一种用户可以上传图片的表单。我想隐藏表单的提交按钮,直到用户实际选择了图像。理想情况下,当用户从表单中删除文件时,提交按钮也应该消失。这是我第一次真正使用这个叉子。我该怎么做?
<div class="fileupload fileupload-new" data-provides="fileupload">
<div class="fileupload-new thumbnail" style="width: 114px; height: 64px;"><img src="http://www.placehold.it/114x64/EFEFEF/AAAAAA" /></div>
<div class="fileupload-preview fileupload-exists thumbnail" style="width: 114px; height: 64px;"></div>
<span class="btn btn-file"><span class="fileupload-new">Select image</span><span class="fileupload-exists">Change</span><input type="file" /></span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
<button type="submit" class="btn btn-primary">Upload</button>
</div>