27、页面打开窗口18

27、页面打开窗口18

脚本说明:

把如下代码加入<body>区域中:

<SCRIPT LANGUAGE="JavaScript">

 

<!-- hide from old browsers

function PopIt(label, msg){ 

        // Set up Page Colors & Table 

        var s1 =     "<TITLE>Information!</TITLE>" +   

        "<BODY BGCOLOR='ffffff'><TABLE BORDER=0><TR>" +       

        "<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+       

        "<FONT SIZE=4>"   

        var s2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><P>"  

        var s3 =       "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+   

        "<TD VALIGN=TOP ALIGN=RIGHT>"+   

        "<FORM><INPUT TYPE='BUTTON' VALUE='Okay'" +                  

        "onClick='self.close()'>"  +   

        "</FORM></TD></TR></TABLE></BODY>"  

        popup = window.open("","popDialog","height=160,width=300,scrollbars=no") 

        popup.document.write(s1+s2+msg+s3) 

        popup.document.close()

}

 

function popHelp(){ 

        PopIt('PopIt', 'This function allows you to '  +                

        'create a popup window.')

}

<!-- done hiding -->

 

</SCRIPT>

<FORM>

<INPUT TYPE="BUTTON" VALUE="Pop-Up" onClick="popHelp()">

</FORM>

 

 

Write a comment

Comments: 0