console
var item1;
var item2;
var item3;
document.getElementById("Change List").onclick = newList
function newList(){
item1 = prompt("Enter a new first thing:");
item2 = prompt("Enter a new second thing:");
item3 = prompt("Enter a new third thing:");
updateList();
}
function updateList(){
document.getElementById("firstThing").innerHTML = item1;
document.getElementById("secondThing").innerHTML = item2;
document.getElementById("thirdThing").innerHTML = item3;
}
<!DOCTYPE HTML>
<html>
<head>
<title>个人主页</title>
</head>
<body>
<h1 id="MyName"><strong>Silence</strong></h1>
<hr>
<p id="aboutMe"><em>I'm learning to build dynamic web pages with Javascipt and HTML</em></p>
<hr>
<h2>Thing I Like</h2>
<p>Here are some of the thong i like to do:</p>
<ul>
<li id="firstThing">Write</li>
<li id="secondThing">Dance</li>
<li id="thirdThing">Travel</li>
</ul>
<button id="Change List" type="button">Change Your List</button>
</body>
</html>
body{
font-family: "Comic Sans MS", cursive, sans-self;
}
#MyName{
background-color:blue;
width:20%;
heigt:20%;
border-radius:50%;
}