I've a variable and I stored a tag in this. I set this tag inside the double quotes and my tag has some attributes and events which are in single quotes. Now problem is that I'm getting double quotes inside the tag which were single quotes before. I want to get single quotes inside the tag of some attributes
var test= "<tr><td><input type='text' class='demo_class' onchange='myfun(this,'val')'></td></tr>"
It's giving me result in browser
<input type="text" class="demo_class" onchange="myfun(this,"val")">
but I want to get
<input type="text" class="demo_class" onchange="myfun(this,'val')">