1 回答

TA貢獻1804條經驗 獲得超7個贊
兩個模態內容的結束標簽都被反轉了。
他們都先關閉 theform然后關閉div,但它應該是相反的,而且還有一個</div>缺失(我改進了標識以幫助更好地可視化問題):
<div id="id01" class="modal">
<form class="modal-content animate" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
<div class="imgcontainer">
<span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close Modal">×</span>
</div>
<div class="container">
<label for="username"><b>Email</b></label>
<input type="text" placeholder="Enter Email" name="username" required>
<span class="help-block"><?php echo $username_err; ?></span>
<br/><br/>
<label for="password"><b>Access Code</b></label>
<input type="text" placeholder="Enter Access Code" name="password" required>
<span class="help-block"><?php echo $password_err; ?></span>
<button type="submit" value="Login" name="Login">Enter</button>
</div>
</form>
</div>
同樣的事情也適用于id="id02"模態。
添加回答
舉報