Hidden window using javascript

前端 未结 3 654
广开言路
广开言路 2020-12-29 10:16

Just wanted to know if it is possible to create a hidden window using javascript?

3条回答
  •  一向
    一向 (楼主)
    2020-12-29 10:49

    You can create an iframe

    var element = document.createElement("iframe"); 
    element.setAttribute('id', 'myframe');
    document.body.appendChild(element);
    

    You can hide an iframe by setting its width and height to zero or by setting its visibility to hidden in the stylesheet.

提交回复
热议问题