I searched for this, but I keep finding issues regarding
"<scr" + "ipt>"
My issue is that I want to generate some JavaScript code from my JavaScript code.
I have copied a general idea below. How can what I want be achieved? Is it necessary to use an external .js file?
document.write("var testprompt = prompt('What zindex page to change?');
var getpage = getElementById('mobileimage'+testprompt);
getpage.style.zIndex = '1000';");
document.writeto generate a completely new page (document.open/write/close). New pages do not preserve the Javascript from the old page, so you need to write new ones.