I want to add elements to the HTML body, but I have a problem. the onclick function doesn't work because I blew the wrong one in the function. the following is the append code in my html
var html= "<button class='btn fab-success' type='button' onclick='openTabGeneral('tab_map', 'Web GIS', 'client/map/index.html', 'Get', 'yes')'>Click</button>";
$("body").append(html);
the result of that html code is
onclick="openTabGeneral(" 'tab_map'',''webgis'',''client/map/client="" map="" index.html'',''get'',''yes'')'=""
i want the result like this
onclick="openTabGeneral('tab_map', 'webgis', 'client/map/index.html', 'get', 'yes')"
please tell me how to change the code like this ^