We then extract the name of the changed property, the new value, and pass that into a function that sets the value through reflection (see listing 7).
然后提取已变更的属性的名称和新的值,并将它们传递给一个函数,该函数通过反射对值进行设置(见清单7)。
To access the preventDefault function, you must pass the handler event through as a parameter and use it to access the function.
要访问preventdefault函数,您必须传递处理函数(即使作为一个参数)或者使用它访问该函数。
In that case, a better solution is to pass setMeta() a two-dimensional array with name-value pairs and have the function loop through it -- performing all the activities simultaneously.
在这种情况下,更佳的解决方案是将带有名称-值对的两维数组传递给 setMeta() ,并且让函数循环执行该数组 — 同时执行所有操作。
应用推荐