简体   繁体   中英

Child window with html5 and JS?

In Silverlight it's possible to create a child window within your app with the CLICK of a button. SO i'm just wondering.... is it possible to have one in html5 with javascrip?

a child window is just a window that you can move around and it can display stuff such as say........ a text chat with another online user.

Sure, window.open . https://developer.mozilla.org/en-US/docs/Web/API/Window.open

example:

var windowObjectReference;
var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";

function openRequestedPopup() {
  windowObjectReference = window.open("http://www.cnn.com/", "CNN_WindowName", strWindowFeatures);
}

Bear in mind some browsers will block this.

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