I want to know how i can make a modal that pops up on click and contains javascript variables and not just text?
CodePudding user response:
If you can post your code here that would be helpful to see what you are trying to do. But at a basic the following HTML would do it.
<button class="btn btn-success" onclick=" window.open('http://google.com','_blank')"> Google</button>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>
CodePudding user response:
You need to create your own element and make it draggable and z-index: 255;
Library that can help:https://github.com/riversun/JSFrame.js/
CodePudding user response:
<button onClick={(e) => window.open('_blank')}>Click Me!</button>
CodePudding user response:
window.open('http://example.com', 'Example', 'popup')