简体   繁体   中英

How to make a popup modal that and be able to write javascript variables in it? Javascript

我想知道如何制作一个在点击时弹出并包含 javascript 变量而不仅仅是文本的模式?

window.open('http://example.com', 'Example', 'popup')

<Button onClick={(e) => window.open('_blank')}>点击我!

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>

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM