JavaScript中的new关键字是new运算符,它创建一个用户定义的对象类型的实例。示例您可以尝试运行以下代码以使用new运算符创建JavaScript对象-实时演示 var dept = new Object(); dept.employee = "Amit"; dept.department = "Technical"; dept.technology ="Java"; document.getElementById("test").innerHTML = dept.employee + " is working on " + dept.technology + " technology."; 输出Amit is working on Java technology.