button
のクリック時にこれらのdivを別のdiv
で非表示にする必要があります。別のdiv
のbutton
をクリックすると、もう一方のdiv
とその逆を隠します。div間の切り替え
<!DOCTYPE html>
<html lang="en">
<head>
<title>
tesing hide
</title>
<style>
#ticket, #usernamepassword { margin-top: 20px; width: 960px; color: navy; background-color: pink; border: 2px solid blue; padding: 5px; text-align: center; }
</style>
</head>
<center>
<div id="ticket">
<div> this is the content of my ticket div
</div>
<button>Show usernamepassword</button>
</div>
<div id="usernamepassword">
<div> this is the content of username and password div</div>
<button>Show ticket</button>
</div>
</center>
</html>
ようこそ。ここでは、ヘルプを依頼する前に人々が[research](https://stackoverflow.com/search?q=toggle+divs)をやってくれることを期待しています。また、[良い質問をするには]を読むように助言したいと思っています(https://stackoverflow.com/help/how-to-ask) – Tijmen
回答を受け入れることを検討してください。 – DimitrisCSD