Карта сайта Интеллектуальная поисковая системаДобавить свою ссылку по ключевому запросуПоисковая система v3.kz поможет ускорить индексацию вашего сайта выводит в Топ |
|
I have group of radio buttons that I want to uncheck after an AJAX form is submitted using jQuery. I have the following function Radio buttons are meant to be required options... If you want them to be unchecked, use a checkbox, there is no need to complicate things and allow users to uncheck a radio button; removing the JQuery allows you to select from one of them. Note: After JQuery 1.6, you should use $(this).prop; instead of $(this).attr in all three places (thanks @Whatevo for pointing this out and see here for further details). UPDATE: Sorry, missed the requirement that it had to be a radio button. If this was previously checked. If ($radio.data(waschecked) == true) { $. If you want to uncheck the radio button from first form you should use $(input[name="BookItem"]) and not $(.TOR2Hours) So, you have two radio buttons. Are both of these bound to the same property? And when when property value is true, you need rb1 checked and rb2 unchecked and when it is false, you need rb1 unchecked and rb2 checked? – decyclone Dec 29 10 at 17:03. What version of .NET are you using? You can check or uncheck a checkbox element or a radio button using the .prop() method You can check/uncheck radio button by setting the checked attribute to true or false as follows. Unfortunately Radio Button has an unchecked event but it doesn’t fire. I thought of implementing uncheck onClick event, but even in this case it always givesChecked valuetrue after clicking on Radio Button. I have a form with 3 radio buttons in a group box. When the user tries to check a radio button, the currently checked button first unchecks, then clicking again on the desired radio button will check it. Информация взята v3.kz |
загрузка...
|