日期:2014-05-16  浏览次数:20369 次

Popup.js 是一个很不错的javaScript 弹出窗口js库。

可修改,可括展性好。

Web编程必备的好工具啊。

//测试文件

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

<script language='javascript' src='newPopup.js' charset="UTF-8"></script>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY charset="UTF-8">
<Script Language="JavaScript">
function ShowIframe() //显示iframe
         {
             var pop=new Popup({ contentType:1,isReloadOnClose:false,width:400,height:500});
             pop.setContent("contentUrl","http://www.baidu.com");
             pop.setContent("title","框架iframe示例");
             pop.build();
             pop.show();
         }
         function ShowHtmlString() //显示html
         {
             var strHtml = "<table border=1 style='width:90%; text-align:center;'><tr style='height:40px'><td>ds</td><td>dads</td></tr><tr style='height:40px'><td>dadas</td><td>dasd</td></tr><tr style='height:40px'><td>dadasd</td><td>dsadads</td></tr></table>";
             var pop=new Popup({ contentType:2,isReloadOnClose:false,width:340,height:300});
             pop.setContent("contentHtml",strHtml);
             pop.setContent("title","字符串示例html");
             pop.build();
             pop.show();
         }
         function ShowAlert() //显示警示对话框
         {
             var pop=new Popup({ contentType:4,isReloadOnClose:true,width:340,height:80});
             pop.setContent("title","警告框示例alert");
             pop.setContent("alertCon","alert对话框的内容");
             pop.build();
             pop.show();
         }
         function ShowConfirm() //显示确认对话框
         {
            var pop=new Popup({ contentType:3,isReloadOnClose:false,width:340,height:80});
             pop.setContent("title","对话框示例confirm");
             pop.setContent("confirmCon","confirm对话框的内容");
             pop