I am trying to dynamically set a cell id using a cnt counter variable. However, instead of a number, I get the cnt word when viewing page source in browser.
What is wrong
q1TargetVolume.setAttribute('id', `q1TargetVolume-${cnt}`);
I am trying to dynamically set a cell id using a cnt counter variable. However, instead of a number, I get the cnt word when viewing page source in browser.
What is wrong
q1TargetVolume.setAttribute('id', `q1TargetVolume-${cnt}`);
Copyright © 2021 Jogjafile Inc.
I guess you wish to append a count value to the string
q1TargetVolume-
, and use it as the id for an element. You can try this method.