2016-07-28 46 views
-1

我一直在嘗試做這項工作,但提交按鈕不工作。 我使用的引導選項卡窗口是:提交按鈕不起作用在引導標籤

<!-- Nav tabs --> 
 
    <ul class="nav nav-tabs" role="tablist"> 
 
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Add new Game</a></li> 
 
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li> 
 
    <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li> 
 
    <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li> 
 
    </ul> 
 

 
    <!-- Tab panes --> 
 
    <div class="tab-content"> 
 
    <div role="tabpanel" class="tab-pane active" id="home"> 
 
         <div class="form-group" style="margin-top: 15px;"> 
 
        <label for="exampleInputEmail1">Game Title</label> 
 
         <input type="text" class="form-control" id="exampleInputEmail1" placeholder="" name="gtitle" /> 
 
         </div> 
 
         <div class="form-group"> 
 
         <label for="exampleInputPassword1">YouTube Link</label> 
 
         <input type="text" class="form-control" id="exampleInputPassword1" placeholder="" name="ytlink" /> 
 
         </div> 
 
         <div class="form-group"> 
 
         <label for="exampleInputPassword1">Link Source</label> 
 
         <input type="text" class="form-control" id="exampleInputPassword1" placeholder="ex: GLEAM, DLH, FAILMID, HRKGAME, INDIEGALA, OTHER, STEAM" name="slink" /> 
 
         </div> 
 
         <div class="form-group"> 
 
         <label for="exampleInputPassword1">Link to Free Steam Keys</label> 
 
         <input type="text" class="form-control" id="exampleInputPassword1" placeholder="KEY MUST GIVE +1 TO THE STEAM LIBRARY GAME COUNT" name="keysl" /> 
 
         </div> 
 
         <label for="exampleInputPassword1">Steam App ID</label>  
 
         <div class="input-group" style="padding-bottom: 10px;"> 
 
         <span class="input-group-addon" id="basic-addon3">http://store.steampowered.com/app/</span> 
 
         <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3" placeholder="App ID" name="appid" /> 
 
         </div> 
 
         <div class="form-group"> 
 
         <label for="exampleInputPassword1">Categories</label> 
 
         <div class="checkbox"> 
 
        
 
          <label class="radio-inline"> 
 
    <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" /> 1 <h4><span class="label label-success">Keys Available</span></h4> 
 
</label> 
 
<label class="radio-inline"> 
 
    <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2" /> 2 <h4><span class="label label-danger">No Keys left</span></h4> 
 
</label> 
 

 
         
 
         </div> 
 
         <button type="submit" class="btn btn-default" name="insert">Submit</button> 
 
         </div> 
 
\t \t \t 
 
         </div> 
 
    <div role="tabpanel" class="tab-pane" id="profile">abc</div> 
 
    <div role="tabpanel" class="tab-pane" id="messages">..</div> 
 
    <div role="tabpanel" class="tab-pane" id="settings">...dd</div> 
 
    </div> 
 

 
</div>

我試着用和JavaScript ..甚至不工作.. 每當我點擊提交按鈕,沒有任何反應和該表單不會發布值。讓我知道如何使這項工作。

+1

我滾你的問題恢復到原來的狀態。沒有必要刪除你的代碼並用「已解決」代替它。接受答案表示已解決。 –

回答

1

您應該使用<form>標籤中,而不是你的form-group提交表單。

做這些,而不是:

<form class="form-group" method="POST" action="submit_something.php"> 
. 
. 
. 
</form> 

,你可能需要使用PHP處理表單提交到數據庫中,如果存在。

2

提交按鈕提交表單。你的form標籤在哪裏?

你需要一個表單標籤用的方法和措施:

<form action="/form-post-url" method="post"> 
+0

哇..我很愚蠢..這是問題..謝謝你的幫助。 –