你能试试这个吗?
var blaa = "aa"; var button = `<a class="nav-link " data-toggle="modal" onclick="showcontent(199,'${blaa}')" href="#">Show content</a>`;