Script. js {code...} index. php {code...} cannot select value & #039; 0 & #039; why?
script.js
$ ("Input: radio [name = pdiyong]"). click (function () {pay_sum = parseFloat ($ ("# pay-sum "). text (); if ($ ("input: radio [name = pdiyong]: checked "). data ('par')> 0) {if (pay_sum> 30) {$ ("input: radio [name = prop]"). attr ('Disabled ', 'Disabled');} else {$ ("input: radio [name = 'pdidong '] [data-par = '0']"). attr ("checked", true); $ ("input: radio [name = 'pdiyong ']"). attr ('Disabled ', 'Disabled'); alert ("the actual payment does not exceed 30 RMB, so you cannot use the coupon! ") }} Else {$ (" input: radio [name = prop] "). removeAttr ('Disabled ');}})
index.php
Coupon(You must pay more than RMB 30 to use it. 5 RMB each time)
- Do not use coupons
- Name: {$ item. name} amount: {$ item. value}
Coupon(You must pay more than ¥ 10 to use it. Not accumulative)
- Do not use coupons
- Name: {$ item. name} amount: {$ item. value}
No wayvalue='0'
Is it true?
Reply content:
script.js
$ ("Input: radio [name = pdiyong]"). click (function () {pay_sum = parseFloat ($ ("# pay-sum "). text (); if ($ ("input: radio [name = pdiyong]: checked "). data ('par')> 0) {if (pay_sum> 30) {$ ("input: radio [name = prop]"). attr ('Disabled ', 'Disabled');} else {$ ("input: radio [name = 'pdidong '] [data-par = '0']"). attr ("checked", true); $ ("input: radio [name = 'pdiyong ']"). attr ('Disabled ', 'Disabled'); alert ("the actual payment does not exceed 30 RMB, so you cannot use the coupon! ") }} Else {$ (" input: radio [name = prop] "). removeAttr ('Disabled ');}})
index.php
Coupon(You must pay more than RMB 30 to use it. 5 RMB each time)
- Do not use coupons
- Name: {$ item. name} amount: {$ item. value}
Coupon(You must pay more than ¥ 10 to use it. Not accumulative)
- Do not use coupons
- Name: {$ item. name} amount: {$ item. value}
No wayvalue='0'
Is it true?
$ ("Input: radio [name = 'pdidong '] [data-par = '0']"). attr ("checked", true );
With the prop () method, google