我有以下功能可以通过单击嵌套列表中的 ul 来交换图像,但它不会停止冒泡列表..
function bimageswap (step) {
step.stopPropagation;
realstep = parseInt(step) + 1;
nextsteps = realstep + 1;
for (iss = nextsteps;iss <= 5; iss++) {
document.getElementById("step" + iss).className = 'step' + iss;
alert(iss);
}
document.getElementById("step" + realstep).className = 'step' + realstep + 'a';
/*$("#step2").css( 'background-image', 'images/adtl_prodimg/discs/step1_.png');*/
return false;
}
它是这样称呼的:
<ul onclick='return bimageswap("4")'>
我尝试了退货,因为这是我在另一个答案中找到的,但它仍然不起作用。我将不胜感激任何帮助谢谢!