如何使用jquery ajax 异步读取js文件中的数组 5
有两个文件,分别是index.html和abc.js,现在abc.js文件内容如下varname=newArray("小明","小红","小刚","小强","狗剩","小...
有两个文件,分别是index.html和abc.js,现在abc.js文件内容如下
var name=new Array("小明","小红","小刚","小强","狗剩","小张","小王","小赵","小孙","小李","小周","小郑")
现在需要实现每次点击按钮,就用ajax方法读取abs.js文件中name数组的3个名字显示到index.html页面中, 直到读取完毕为止。用jquery有什么简单的实现方式吗? 展开
var name=new Array("小明","小红","小刚","小强","狗剩","小张","小王","小赵","小孙","小李","小周","小郑")
现在需要实现每次点击按钮,就用ajax方法读取abs.js文件中name数组的3个名字显示到index.html页面中, 直到读取完毕为止。用jquery有什么简单的实现方式吗? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询