2つのdivを作成しました。タブをクリックすると残りの2つのdivが隠され、3番目が表示されます。これをやろうとしていますが、今まで何も成功していませんでした。divの残りの部分を隠し、アンカータグをクリックした後に新しいdivを表示します
私にこれを手伝ってください。
三つのdiv要素は、私はこのようなものです---
まずdivの
<div id="div1">
<div style="text-align:center;padding:10px;">New to Register?</div>
<table align="center">
<tr>
<td><input type="email" name="email" placeholder="Email" required pattern="[a-z0-9._%+-][email protected][a-z0-9.-]+\.[a-z]{2,3}$" title="[email protected]" >
</td>
</tr>
<tr>
<td><input type="password" name="password" placeholder="Password" required></td>
</tr>
<tr>
<td><input type="password" name="password" placeholder="Confirm Password" required></td>
</tr>
<tr>
<td>
<button style="height:32px; border-radius:2px; border:none; color:white; width:100%; margin-bottom: 12px; background-color:rgb(255, 201, 73)" name="submit" id="submit"> LOG IN </button>
</td>
</tr>
</table>
</div>
第二のdiv ---
<div id="div2">
<div style="text-align:center;padding:10px;">Log In</div>
<table align="center">
<tr>
<td><input type="text" name="email" placeholder="Email" required pattern="[a-z0-9._%+-][email protected][a-z0-9.-]+\.[a-z]{2,3}$" title="[email protected]" ></td>
</tr>
<tr>
<td><input type="password" name="password" placeholder="Password" required></td>
</tr>
<tr>
<td colspan="2" align="center">
<div class="left">
<label><input class="classforcheckbox" type="checkbox" /> Keep me logged in</label>
</div>
<div class="right" ><a>Forgot Password?</a></div>
</td>
</tr>
<tr>
<td>
<button style="height:32px; border-radius:2px;margin-bottom: 10px; border:none; color:white; width:100%; background-color:rgb(255, 201, 73);" name="submit" id="submit"> LOG IN </button>
</td>
</tr>
</table>
</div>
第三のdiv ---
<div id="div3">
<div style="text-align: center;padding: 10px">Forgot Password</div>
<div style="text-align: center;padding: 10px">Enter your email below and we'll send you an email with instruction on how to re-new your password.</div>
<table align="center">
<tr>
<td>
<input type="text" name="email" placeholder="Email" required pattern="[a-z0-9._%+-][email protected][a-z0-9.-]+\.[a-z]{2,3}$" title="[email protected]">
</td>
</tr>
<tr>
<td>
<button style="height: 32px;border-radius: 2px;margin-bottom: 10px;border: none;color: white;width: 100%;background-color: rgb(255, 201, 73);" name="submit" id="submit">Send Email</button>
</td>
</tr>
</table>
</div>
div1、div2は私がcliのときに隠すべきだパスワードを忘れた場合はdiv3を表示する必要があります。 助けていただければ幸いです。
onclickの? –