每日日报2021.6.4

今天完成内容:

学习JavaScript

prototype

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>lalala</title>
</head>
<body>

<h2>JavaScript 对象</h2>

<p id="demo"></p>

<script>
function Person(first, last, age, eye) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eye;
}

var myFather = new Person("John", "Doe", 50, "blue");
var myMother = new Person("Sally", "Rally", 48, "green");

document.getElementById("demo").innerHTML =
"我的父亲年龄是 " + myFather.age + "。我的母亲年龄是 " + myMother.age;
</script>

</body>
</html>

看视频

遇到问题:

明日目标:

学习web端的开发

学习css

posted @ 2021-06-04 15:47  1905-1雷宇  阅读(30)  评论(0编辑  收藏  举报