How to create ID in myFunction() , im using javascript file. cuz javascript need single string for call html script in variable. cmiiw.
Sample code:
<button class="tablinks" onclick="openFolder(event, 'Folder1')">Folder 1</button>
How to create ID in myFunction() , im using javascript file. cuz javascript need single string for call html script in variable. cmiiw.
Sample code:
<button class="tablinks" onclick="openFolder(event, 'Folder1')">Folder 1</button>
Your question is more like: How do I use quotes inside quotes. The solution is to use single quotes if you want double quotes in the string, and double quotes if you want single quotes in the string.
'<button class="tablinks" onclick="openFolder(event, '+'"Folder1")">Folder 1</button>'
alternatively use backticks; template literals
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
making the task much easier:
`<button class="tablinks" onclick="openFolder(event, 'Folder1')">Folder 1</button>`