JavaScript Reference/Javascript Methods/show

Материал из Web эксперт
Перейти к: навигация, поиск

"show()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> var myPopup function function1() {

   myPopup = window.createPopup();
   myPopup.document.body.style.backgroundColor = "yellow";
   myPopup.show(100,100,100,200,document.body); 

} </script> <input type="button" value="Show popup window" onclick="function1();"> <input type="button" value="Hide popup window" onclick="myPopup.hide();"> </body> </html>


     </source>
   
  


"show()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |popup | +----------------+--------------------------------------------------------------+

     </source>
   
  


"show()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Display a pop-up window.

Syntax:

popupName.show(param1, param2, param3, param4, param5) Parameters:

   param1   Required; the X coordinate of the pop-up window in pixels.
   param2   Required; the Y coordinate of the pop-up window in pixels.
   param3   Required; the width of the pop-up window in pixels.
   param4   Required; the height of the pop-up window in pixels.
   param5   Optional; the name of the object relative to which param1 and param2 are calculated. 
                      If param5 is omitted, param1 and param2 are calculated relative to the 
                      screen.
     
     </source>