解决方案:
function create_variable(num){
var name = "test_"+num; //生成函数名
window[name] = 100;
window['name'] = 200; //注意看中括号里的内容加引号和不加引号的区别
}
参考链接:https://blog.csdn.net/qq_31238721/article/details/78257449
2022-07-23 08:26:45
解决方案:
function create_variable(num){