先定义一个对象,然后动态的设置键与值 let obj = {}; let name = "123", let value = "456"; obj[name] = value
本文标题:js动态设置对象属性名与属性值
本文链接:https://www.haomeiwen.com/subject/cyrimktx.html
网友评论