Tell me I’m going to make sure that on every page of the user there is a button, when clicked, a form is created in a modal window to send a message.
function createBlock(){ var block = document.createElement('div'); block.className = 'overlay' block.innerHTML = 'код' document.body.appendChild(block); }
Here is the code that will create the element, etc. Tell me what to add in front of it so that the screen would be darkened before creating the form? Is it possible to create an element animated? + Do you have to write all the form code in block.innerHTML? Or can you paste the code from a third-party file there? Thanks in advance! )