2016-03-02 138 views
0

我知道語法是最有可能的里程,但我想知道是否有人可以建議爲什麼我的提交按鈕不做任何事情,但是當我刪除表單標記之間的代碼它工作正常,服用它action.php的Submit button not working following

#team { 
 
    margin-left: 50px; 
 
    outline: none; 
 
} 
 
#teamselection { 
 
    padding-top: 25px; 
 
    padding-left: 100px; 
 
    line-height: 150%; 
 
} 
 
/*#arsenal{ 
 
display:none; 
 
} over-ridden by some script displaying this is checkbox is selected*/ 
 

 
input[type="number"].money2, 
 
.money3, 
 
.money4, 
 
.money5, 
 
.money6, 
 
.money7, 
 
.money8, 
 
.money9, 
 
.money10 { 
 
    display: none; 
 
    /*over-ridden by checking the checkbox to show the requested element*/ 
 
    width: 100px; 
 
    margin: 10px 0px 25px 50px; 
 
} 
 
#teamSubmit { 
 
    background: #CCCCCC; 
 
    margin-bottom: 100px; 
 
}
<form name="ticketSales" method="post" action="action.php"> 
 

 
    <select id="team"> 
 
    <option>Please select your team...</option> 
 
    <option value="arsenal">Arsenal</option> 
 
    <option value="astonvilla">Aston Villa</option> 
 
    <option value="bournemouth">Bournemouth</option> 
 
    <option value="chelsea">Chelsea</option> 
 
    <option value="crystalpalace">Crystal Palace</option> 
 
    <option value="everton">Everton</option> 
 
    <option value="leicester">Leicester City</option> 
 
    <option value="liverpool">Liverpool</option> 
 
    <option value="mancity">Manchester City</option> 
 
    <option value="manutd">Manchester United</option> 
 
    <option value="newcastle">Newcastle</option> 
 
    <option value="norwich">Norwich City</option> 
 
    <option value="stoke">Stoke City</option> 
 
    <option value="southampton">Southampton</option> 
 
    <option value="sunderland">Sunderland</option> 
 
    <option value="swansea">Swansea</option> 
 
    <option value="tottenham">Tottenham Hotspur</option> 
 
    <option value="watford">Watford</option> 
 
    <option value="westbrom">West Bromwich Albion</option> 
 
    <option value="westham">West Ham United</option> 
 
    </select> 
 
    <br> 
 

 
    <div id=teamselection> 
 

 
    <div id="arsenal"> 
 
     Select your season ticket seating section 
 
     <br> 
 
     <select id="Section" name="Section"> 
 
     <option>Please select...</option> 
 
     </select> 
 
     <br>Row 
 
     <input type="text" required name="seatRow" style="width:50px;margin-left:10px;margin-right:10px;">Seat 
 
     <input type="text" required name="seatNumber" style="width:50px;margin-left:10px;margin-right:10px;"> 
 
     <br>Select which games you wish to share your season ticket for 
 
     <br> 
 
     <input type="checkbox" class="game2" value="Car">Swansea 
 
     <br> 
 
     <input type="number" required name="money2" class="money2" placeholder="&pound;"> 
 
     <br> 
 
     <input type="checkbox" class="game3" value="Car">West Bromwich Albion 
 
     <br> 
 
     <input type="number" required name="money3" class="money3" placeholder="&pound;"> 
 
     <br> 
 
     <input type="checkbox" class="game4" value="Car">Watford 
 
     <br> 
 
     <input type="number" required name="money4" class="money4" placeholder="&pound;"> 
 
     <br> 
 
     <input type="checkbox" class="game5" value="Car">Crystal Palace 
 
     <br> 
 
     <input type="number" required name="money5" class="money5" placeholder="&pound;"> 
 
     <br> 
 
     <input type="checkbox" class="game6" value="Car">Norwich 
 
     <br> 
 
     <input type="number" required name="money6" class="money6" placeholder="&pound;"> 
 
     <br> 
 
     <input type="checkbox" class="game7" value="Car">Aston Villa 
 
     <br> 
 
     <input type="number" required name="money7" class="money7" placeholder="&pound;"> 
 
     <br> 
 
    </div> 
 
    </div> 
 

 
    <input type="submit" id="teamSubmit"> 
 
</form>

任何提示,以整理代碼也會被讚賞。首先十分感謝。

+0

和你的php代碼? – Rhopercy

回答

1

您的款式設置爲display:none;由於輸入字段是必需的,瀏覽器無法集中元素,因此無法提交。

使您的風格顯示爲金錢*,然後你可以看到它的工作。