Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on How to fire the change event for an input field?
Post
How to fire the change event for an input field?
+1
−1
I have added some input to an input field element this way:
const inputFiled = document.querySelector("#example");
inputField.value = "X";
I want to fire a change event for that field right after the input was added.
This is something I want to try after noticing that the input isn't recognized (the form won't be submitted) if added in the above way; rather, it is recognized only by typing/pasting.
How to do that?
1 comment thread