<html>
<body>
<script>
var person = new Object();
person.name = "Nicholas";
person.age = 29;
person.job = "Software Engineer";
person.sayName = function()
{
return this.name;
};
person.sayName();
document.write(person.sayName());
</script>
</body>
</html>
Js 创建对象
最新推荐文章于 2022-08-22 09:01:11 发布