master
*anna* 4 years ago
parent 2522406573
commit 768db25586

@ -0,0 +1,12 @@
.act {
display: none;
}
body.act1 #act1{
display:block;
}
body.act2 #act2{
display:block;
}
body.act3 #act3{
display:block;
}

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>stage</title>
<link rel="stylesheet" href="stage.css">
</head>
<body >
<button id="bact1">act1</button> <button id="bact2">act2</button> <button id="bact3">act3</button>
<div id="act1" class="act"> act1</div>
<div id="act2" class="act"> act2</div>
<div id="act3" class="act"> act3</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="stage.js"></script>
</body>

@ -0,0 +1,20 @@
$("button#bact1").click(function(){
$("body")
.removeClass("act1 act3 act2")
.addClass("act1");
})
$("button#bact2").click(function(){
$("body")
.removeClass("act1 act3 act2")
.addClass("act2");
})
$("button#bact3").click(function(){
$("body")
.removeClass("act1 act3 act2")
.addClass("act3");
})

@ -65,7 +65,6 @@ Maybe you want to <button id="paper_1">read</button>,<button id="paper_2">read</
</div> </div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="script.js" ></script> <script type="text/javascript" src="script.js" ></script>

Loading…
Cancel
Save