网页锁屏弹出浮动窗口js特效 – 浮动框架 POPUP.js 类 使用方法 及 下载地址
下载 popup.rar 内含源码 及 使用方法
使用方法:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<head>
<title>百度POPUP效果</title>
<script type=”text/javascript” src=”http://demo.web265.com/js/popbaidu.js”></script>
<script type=”text/javascript”>
function ShowIframe()
{
var pop=new Popup({ contentType:1,isReloadOnClose:false,width:400,height:500});
pop.setContent(“contentUrl”,”http://www.163.com”);
pop.setContent(“title”,”iframe框架示例”);
pop.build();
pop.show();
}
function ShowHtmlString()
{
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>www.web265.com</td><td>dasd</td></tr><tr style=’height:40px’><td><a target=’_blank’
href=’http://www.web265.com’>点击进入</a></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 ShowConfirm()
{
var pop=new Popup({ contentType:3,isReloadOnClose:false,width:340,height:80});
pop.setContent(“title”,”confirm对话框示例”);
pop.setContent(“confirmCon”,”confirm对话框的内容”);
pop.setContent(“callBack”,ShowCallBack);
pop.setContent(“parameter”,{id:”divCall”,str:”点击确定后显示的字符串”,obj:pop});
pop.build();
pop.show();
}
function ShowAlert()
{
var pop=new Popup({ contentType:4,isReloadOnClose:false,width:340,height:80});
pop.setContent(“title”,”alert警告框示例”);
pop.setContent(“alertCon”,”alert对话框的内容,web265.com收集”);
pop.build();
pop.show();
}
function ShowCallBack(para)
{
var o_pop = para["obj"]
var obj = document.getElementById(para["id"]);
o_pop.close();
obj.innerText = para["str"];
}
function sendmessage(url)
{
g_pop=new Popup({ contentType:1, isReloadOnClose:false, width:400, height:450 });
g_pop.setContent(“title”,”发送短消息”);
g_pop.setContent(“contentUrl”,url);
g_pop.build();
g_pop.show();
return false;
}
</script>
</head>
<body style=”text-align:center;”>
<form id=”form1″ runat=”server”>
<div>
<a href=”javascript:ShowIframe()”>iframe框架示例</a>
<br />
<a href=”javascript:ShowHtmlString()”>html字符串示例</a>
<br />
<a href=”javascript:ShowConfirm()”>confirm对话框示例</a>
<br />
<a href=”javascript:ShowAlert()”>alert警告框示例</a> <br />
<a href=’javascript:Comment(“http://zhidao.baidu.com/userlogin.html?login”,450,250)’>登陆</a> <br />
<input type=button onclick=sendmessage(“http://www.160.com”) value=发送短消息>
</div>
<div id=”divCall” style=”width:300px; height:200px; background-color:#cccccc; color:Red; float:right;”>
</div>
</form>
</body>
</html>
