how to disable or enable all onClick for images on a page

前端 未结 5 1556
不知归路
不知归路 2021-01-17 17:40

When the user clicks on an image, I want the onClicks on all other images to be disabled until my function has finished.

I currently have this code that disables the

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-17 18:12

    onclick it suppposed to be pointing to a javascript function. instead of onclick try with.

    eles[i].disabled="true"
    

    and at the end of your method back to eles[i].disabled="false"

提交回复
热议问题