jQuery Click Event Not Updating Hidden Input Field - Troubleshooting Guide
Based on the provided code, it seems like you are trying to update the value of the hidden input field with class "q_uid_img" when the ".qmulimg" element is clicked. However, it is not clear what you mean by "input not updated".\n\nHere are a few potential issues that could be causing the problem:\n\n1. Make sure that the code is wrapped inside the document ready function:\n\njavascript\n$(document).ready(function() {\n // Your code here\n});\n\n\n2. Check if there are any JavaScript errors in the console. If there are any errors, fix them and try again.\n\n3. Double-check that the click event is being triggered correctly. You can add a console.log statement inside the click event to see if it is being executed:\n\njavascript\n$(document).on('click', '.qmulimg', function() {\n console.log("Clicked on .qmulimg");\n // Rest of your code\n});\n\n\n4. Verify that the hidden input field with class "q_uid_img" exists in the HTML markup. Make sure there are no typos in the class name.\n\nIf none of these suggestions solve the issue, please provide more information about what exactly is not working or any error messages you are encountering.
原文地址: https://www.cveoy.top/t/topic/qlgr 著作权归作者所有。请勿转载和采集!