【发布时间】:2016-10-20 22:19:19
【问题描述】:
【问题讨论】:
-
您的 JsFiddle 中没有图像。你目前有什么尝试?
标签: javascript jquery html css json
【问题讨论】:
标签: javascript jquery html css json
要加载 json,请使用 getJSON 方法,例如
$.getJSON("data.json", function(data) { doSomething(); } )
我不确定你想要达到什么样的效果,但也许会是这样的
$("#next").click(function() {
$("#img").src = images[++current];
$("#info").text( texts[current] );
})
【讨论】: