I have a problem, I need to obtain the values for html elements by name using Jquery ussually I would do it like this $("input[name=form_size]).val(); but what if my name attr value looks like this name="data[referralMedium][referral_id]" how do I write the JQuery code?
I have a problem, I need to obtain the values for html elements by
Share
You need to put quote marks around it:
Note that technically the quote marks are always required. See the docs for the attribute equals
[name="value"]selector.