2016-08-22 61 views
0

我嘗試創建輸入文件在旁邊bootstrap,但是當我點擊附加文件的按鈕,彈出瀏覽文件不工作。你知道什麼問題嗎?不能在旁邊引導文件輸入文件

<aside id="sidebar-right" class="sidebar-right"> 
<div class="form-group"> 
    <label class="col-md-3 control-label">File Upload</label> 
    <div class="col-md-6"> 
    <div class="fileupload fileupload-new" data-provides="fileupload"> 
     <div class="input-append"> 
     <div class="uneditable-input"> 
      <i class="fa fa-file fileupload-exists"></i> 
      <span class="fileupload-preview"></span> 
     </div> 
     <span class="btn btn-default btn-file"> 
      <span class="fileupload-exists">Change</span> 
      <span class="fileupload-new">Select file</span> 
      <input type="file" /> 
     </span> 
     <a href="#" class="btn btn-default fileupload-exists" data-dismiss="fileupload">Remove</a> 
     </div> 
    </div> 
    </div> 
</div> 

回答

0

當您關閉預留標籤?關閉它並重試。

+0

只是錯過了,當我從我的工作表 –

0
<!DOCTYPE html> 
<html> 
<head> 
<title>Page Title</title> 
</head> 
<body> 
<aside id="sidebar-right" class="sidebar-right"> 
<div class="form-group"> 
    <label class="col-md-3 control-label">File Upload</label> 
    <div class="col-md-6"> 
    <div class="fileupload fileupload-new" data-provides="fileupload"> 
     <div class="input-append"> 
     <div class="uneditable-input"> 
      <i class="fa fa-file fileupload-exists"></i> 
      <span class="fileupload-preview"></span> 
     </div> 
     <span class="btn btn-default btn-file"> 
      <span class="fileupload-exists">Change</span> 
      <span class="fileupload-new">Select file</span> 
      <input type="file" /> 
     </span> 
     <a href="#" class="btn btn-default fileupload-exists" data-dismiss="fileupload">Remove</a> 
     </div> 
    </div> 
    </div> 
</div> 
</aside> 

</body> 
</html> 

工作正常,只是在前面的回答中添加了相同的代碼。 https://jsfiddle.net/14Lfb7kh/

+0

複製此代碼,但不工作在我的旁邊引導。順便說一句,關閉旁邊只是錯過了當我複製此代碼,而不是在我的代碼 –

+0

做到這一點https://jsfiddle.net/14Lfb7kh/代碼工作或不在jsfiddle –