简体   繁体   中英

Radio button with return false javascript still invoke onchange with old value

I have a radio button that bind to change event and check it's value. But when that radio button was also bind with on click for disable, it's still invoke change event with clicked value.

How can i fix this problem so it won't call change or call change without value of clicked radio button.

Fiddle Demo

Thank you in advance.

I changed the selector input[type=radio][name=test] to input[type=radio][name=test]:not(.radreadonly) so that event handler would not be attached to radio buttons with the readonly class.

Fiddle

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