Hi,
I have an HTML like below:
and I have a variable call 'status'
var status = 'checked' // the value can either 'checked' or empty
how to concatenate the above HTML code, I expect to get automatic checkbox checked, when the status value is 'checked', I tried below but it doesn't work, need help.
thank you
I have an HTML like below:
Code:
`<input type="checkbox" class="editor-is_supervisor" onclick="myfunc(this)" id="${idx} " />`;
var status = 'checked' // the value can either 'checked' or empty
how to concatenate the above HTML code, I expect to get automatic checkbox checked, when the status value is 'checked', I tried below but it doesn't work, need help.
Code:
`<input type="checkbox" class="editor-is_supervisor" onclick="myfunc(this)" id="${idx} " + status />`;