当前位置:网站首页>heaven and hell's moving
heaven and hell's moving
2022-06-26 02:09:00 【Asmruan】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style lang="">
header{
display: flex;
justify-content: space-evenly;
}
div{
width: 500px;
height: 400px;
border: 2px solid red;
}
</style>
</head>
<body>
<header>
<div>
<h2> The universe moves </h2>
</div>
<button> Start </button>
<div id="two">
</div>
</header>
</body>
</html>
<script>
// 1. obtain dom The binding event
// 2. Get text content
// 3. Assign to new div
var flag = true
document.querySelector("button").addEventListener("click",function(){
if(flag){
document.querySelector("#two").innerHTML = document.querySelector("div").innerHTML
document.querySelector("div").innerHTML = ""
}else{
document.querySelector("div").innerHTML = document.querySelector("#two").innerHTML
document.querySelector("#two").innerHTML = ""
}
flag = !flag
})
</script>边栏推荐
- vs2015+PCL1.8.1+qt5.12-----(1)
- win32
- cv==biaoding---open----cv001
- Gun make (3) Rules for makefile
- Shell curl execution script, with passed parameters and user-defined parameters
- Differences and functions of TOS cos DSCP
- cv==biaoding---open----cv001
- About vs scanf, 'scanf' appears: this function or variable may be unsafe Solutions to the problem of consumer usi
- Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) C. Felicity is Coming!
- Easy to understand C language keyword static
猜你喜欢
随机推荐
LeetCode 41 ~ 50
Output Lua print to the cocos2d console output window
ROS2+DDS+RTPS
Characteristics and related specificity of Papain
cv==biaoding---open----cv001
标定。。。
Use of redis
Computer shortcut keys commonly used by experts
One minute to understand the difference between synchronous, asynchronous, blocking and non blocking
Cs144 environment configuration
Analytic hierarchy process
将lua print输出到cocos2d控制台输出窗口中
cv==biaoding---open----cv001
SQL column value to row value (unpivot)
How to set achievable medium - and long-term goals?
Gun make (7) execute make
Jenkins localization and its invalid solution
Application and chemical properties of elastase
Tarte aux framboises + AWS IOT Greengrass
Qtvtkvs2015 test code









