【发布时间】:2011-05-02 15:50:10
【问题描述】:
嘿,我在一个 div 中有 10 个十个图像(名称是背景).. 并且显示属性是无..
我想按问题编号显示.. 我的意思是 Question=1 img1.hide(),img2.show() Question=2 img2.hide(); img3.show .... 第10题 img9.hide() img10.show
我的函数名称是 resim(),它从按钮单击回调
function resim(question) 这是错误的 :) 实际上这是错误的.. 它不起作用 :))
var i=0;
while (i<3)
{
if (question==i)
{
$("#background img").eq(i-1).hide();
$("#background img").eq(i).show();
i++;
}
else
{
return;
}
}
但我不能做这个功能......它必须怎么做?对不起我的英语
【问题讨论】:
标签: javascript jquery