简体   繁体   中英

The javascript code does not detect the change in value

I have a ready javascript code. The input works when the key is pressed. However, when I assign a value with another javascript code into the input, the other javascript code does not detect a change. When I press a key on the keyboard, the process is taking place.

the only thing I really want to do is :

https://github.com/jessepollak/card

expiry date is input.

I want to get select option for month and year.

for this, I write the value in the hidden input.

however, the other javascript code does not detect this value.

please help me. sorry I'm a novice.

When you programmatically change the element value, the on change event you have defined will not fire.

To fix your issue, you should call the change event handler after setting the value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM