<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="utf-8" /> <meta name="Robots" content="all" /> <meta name="Author" content="KudyChen" /> <meta name="Copyright" content="KudyStudio.Com" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>Jbox学习</title> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <!--jbox--> <link id="skin" rel="stylesheet" href="js/jBox/Skins/Blue/jbox.css" /> <script type="text/javascript" src="js/jBox/jquery.jBox-2.3.min.js"></script> <script type="text/javascript"> $(function(){ //demo //window alert $.jBox.setDefaults({ defaults: { border: 0} }); // 只修改全局 border $("#btn_alert").bind("click",function(){ $.jBox.info('这是window alert'); }); $("#btn_call").bind("click",function(){ $.jBox("有回调函数", { title: "窗口", submit: callHandler }); }); $("#btn_NoDrag").bind("click",function(){ $.jBox("拖动不了", { title: "窗口", draggable:false }); }); $("#btn_dragClone").bind("click",function(){ $.jBox("克隆窗口", { title: "窗口" ,dragClone: true}); }); $("#btn_hideICON").bind("click",function(){ $.jBox("隐藏标题的图标", { title: "窗口" ,dragClone:false,showIcon: false}); }); $("#btn_html").bind("click",function(){ var html="<div style='border:1px solid #99bbe8;margin:10px'>这是div内容</div>" $.jBox(html, { title: "窗口" ,dragClone:false}); }); $("#btn_closed").bind("click",function(){ $.jBox("关闭后的事件", { title: "窗口" ,closed:closeHander}); }); $("#btn_contentByObject").bind("click",function(){ var html="<div style='border:1px solid #99bbe8;margin:10px' id='div_1'>这是div内容</div>" $.jBox(html, { title: "窗口" ,submit:function(v,h,f){ $.jBox.tip('div_1的html:\t'+$(h).children("#div_1").html()); }}); }); }); function callHandler(v, h, f){ //alert(v+"\t"+h+"\t"+f); $.jBox.tip('你点击的按钮是'+v, 'success'); } function closeHander(){ $.jBox.tip('关闭后事件'); } </script> <style type="text/css"> </style> </head> <body> <button id="btn_alert">alert</button><br/><br/> <button id="btn_call">回调事件</button><br/><br/> <button id="btn_NoDrag">不可以拖动</button><br/><br/> <button id="btn_dragClone">克隆窗口</button><br/><br/> <button id="btn_hideICON">隐藏标题的图标</button><br/><br/> <button id="btn_html">插件html代码</button><br/><br/> <button id="btn_html">插件html代码</button><br/><br/> <button id="btn_closed">关闭后的事件</button><br/><br/> <button id="btn_contentByObject">获取内容中的对象</button><br/><br/> <!--<div style="height:1200px;border:1px solid #99bbe8"></div>--> </body> </html>