Answers for "setattribute is not a function jquery"

0

setattribute is not a function jquery

Use jquery.attr() like,

$(txtEndDate).attr('dateInRegionalFormat', txtEndDate.value);
Updated there may be multiple elements so use [0] for the first element like,

txtEndDate[0].setAttribute('dateInRegionalFormat', txtEndDate.value);
Posted by: Guest on January-28-2021

Code answers related to "setattribute is not a function jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language