Define a function with a name in the string

后端 未结 0 1055
旧巷少年郎
旧巷少年郎 2021-02-13 05:57

I need to define a function with a name that I have in the string.

Not a big deal, right?

window[fnName] = function(...args) {
  // ...
}

相关标签:
回答
  • 消灭零回复
提交回复
热议问题