Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15476

how to concatenate the above HTML code

$
0
0
Hi,

I have an HTML like below:

Code:

`<input type="checkbox" class="editor-is_supervisor" onclick="myfunc(this)" id="${idx} " />`;
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.

Code:

`<input type="checkbox" class="editor-is_supervisor" onclick="myfunc(this)" id="${idx} " + status />`;
thank you

Viewing all articles
Browse latest Browse all 15476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>