JS将数组中各元素定义为变量?
现在有一个数组vararr=["studentName","age","pss","course","Period","Type"],数组中共有六个元素,如何将六个元素分...
现在有一个数组var arr = ["studentName", "age", "pss", "course", "Period", "Type"],数组中共有六个元素,如何将六个元素分别定义为变量。
就是var studentName = "1";var age = "2"; var pss = "3"; var course = "4"……,以此类推,然后可讲这些变量赋值给字符串中的${studentName},${age},${pss},${course},${Period},${Type}。 展开
就是var studentName = "1";var age = "2"; var pss = "3"; var course = "4"……,以此类推,然后可讲这些变量赋值给字符串中的${studentName},${age},${pss},${course},${Period},${Type}。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询