第二天
This commit is contained in:
26
02. 前端Web基础(JS+Vue+Ajax)/JS-Vue/05. JS-自定义对象.html
Normal file
26
02. 前端Web基础(JS+Vue+Ajax)/JS-Vue/05. JS-自定义对象.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>JS-函数</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<script>
|
||||
let use = {
|
||||
name: '张三',
|
||||
age: 18,
|
||||
show: function () {
|
||||
alert(this.name + ',年龄' + this.age);
|
||||
}
|
||||
};
|
||||
// use.show();
|
||||
// alert(use.name);
|
||||
// alert(use);
|
||||
alert(JSON.stringify(use));
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user