You are here: Reference > JavaScript > client-side > dialog > properties > document (popup)

document property (popup)

Browser support:
Returns a reference to the document object in a popup window.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Reference to the document object.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the document property:
    <script type="text/javascript">
        var popupWindow = null;
        function MakePopup () {
            if (window.createPopup) {        //Internet Explorer
                if (!popupWindow) {
                    popupWindow = window.createPopup ();
                    var popupBody = popupWindow.document.body;
           = "lightblue";
           = "solid black 1px";
                    popupBody.innerHTML = "Click outside to close.";
       (100, 100, 150, 25, document.body);
            else {
                alert ("Your browser does not support this example!");
    <input type="button" value="Create a popup window!" onclick="MakePopup ();"/>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content