Based on the provided code, it seems that you are trying to update the value of the hidden input field with class 'q_uid_img' when clicking on an image with class 'qmulimg'. However, the code you have written does not seem to have any issues.

To debug the problem, you can try the following steps:

  1. Check if the jQuery library is properly loaded before your code.
  2. Make sure that the click event is being triggered by using console.log or alert inside the click event handler.
  3. Verify that the image element with class 'qmulimg' is being selected correctly by using console.log or alert inside the click event handler.
  4. Check if the closest ancestor element with class 'qq_uploader' exists and contains the hidden input field with class 'q_uid_img'.
  5. Verify that the value of 'imgidlist' is being correctly assigned and joined using console.log or alert inside the click event handler.
  6. Check if the hidden input field with class 'q_uid_img' is being selected correctly by using console.log or alert inside the click event handler.

By following these steps, you should be able to identify any issues with the code and fix them accordingly.

jQuery Image Click Event not Updating Hidden Input Value

原文地址: https://www.cveoy.top/t/topic/qlgs 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录