So this is a bit difficult to explain.. What is the correct order in which to put ' " " and so on?
Here is an example:
document.getElementById.("Test1").innerHTML = '<div onclick="alert(\'Test\'); document.getElementById(\'Test2\').innerHTML = ...></div>
Theres the ', then the " in onclick="...", then the \' in getElementById(\'Test2\').
Now how do I continue if I want to insert more code like this in ...? I hope I could explain this correctly... I already asked ChatGPT but it's solution didn't work.
Why do I need this? Because I want to echo with php a bit of HTML with javascript into my document at one time and because echoing <script> tags into the HTML doesn't work, I need to write the code directly into the onclick="" function of my <div>