Files
JavaWeb/02. 前端Web基础(JS+Vue+Ajax)/JS-Vue/05. JS-自定义对象.html
syx_computer 61ec7c9468 第二天
2025-10-13 10:15:32 +08:00

26 lines
449 B
HTML

<!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>