代码如下:var t9 = new PopupLayer({trigger:"#ele9",popupBlk:"#blk9",closeBtn:"#close9",useOverlay:true,useFx:true,offsets:{x:0,y:-41}});t9.doEffects = function(way){ if(way == "open"){ this.popupLayer.css({opacity:0.3}).show(400,function(){ this.popupLayer.animate({ left:($(document).width() - this.popupLayer.width())/2, top:(document.documentEleme...
JQuery插件fancybox解决无法在弹出层使用左右键的问题。无法使用的原因在于,插件接管了左右键,用于多张图片的翻页。 如果不需要这个功能,可以在fancybox插件中,禁止接管就好了。 具体在插件下的js文件 jquery.fancybox-1.3.4.js 中的598行,注释掉就好了。 // _set_navigation();
代码如下:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> <!-- *{font-size:12px;font-family:Verdana, Geneva, sans-serif;line-height:14px} a{color:#039} a:hover{color:#f60} .pop{position:absolute;left:40%;top:40%;width:300px;height:100px;background:#eee;border:1px solid #ccc} .pop_head{position:relative;height:20px...
如下所示: 代码如下:<html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <style type="text/css"> .toopTip { background-color:Yellow; border-style:solid; border-width:1px; border-color:Red; } </style> <script language="javascript" type="text/javascript"> /* 如果希望提示的div的左边界与上边界与显...
js+css 实现遮罩居中弹出层(随浏览器窗口滚动条滚动) 代码如下:<!doctype html> <head> <meta charset="utf-8" /> <title></title> <style type="text/css"> *{}{margin:0;padding:0;} html{}{_background:url(about:blank);} /**//* 阻止闪动 in IE6 , 把空文件换成about:blank , 减少请求 */ body{}{background:#fff; font: 12px/1.5 Tahoma,Geneva, \\5b8b\\4f53, sans-serif; height:100%;} .wrap{}{height:980px; padding-to...
如下所示: 代码如下: <script language="javascript" type="text/javascript"> function alertWin(title, msg, w, h) { var titleheight = "22px"; // 窗口标题高度 var bordercolor = "#666699"; //窗口的边框颜色 var titlecolor = "#FFFFFF"; // 窗口的标题颜色 var titlebgcolor = "#666699"; // 窗口的标题背景色 var bgcolor = "#FFFFFF"; // 内容背...
弹出层窗口永远居中 代码如下:<script type="text/javascript"> var isIE=window.XMLHttpRequest?false:true; var aIsIE={}; window.onload=function(){ if(isIE){ window.onscroll=doIE; window.onresize=doIE; } function doIE(){ aIsIE.top=document.documentElement.scrollTop; aIsIE.left=document.documentElement.scrollLeft; var width=document.documentElement.clientWidth; var height=document.documentElement.clien...
点击弹出层外区域关闭弹出层jquery特效,废话不说,上代码,简洁明了: 代码如下:<html> <head> <style> .hide{display:none;} .con{width:500px;height:300px;background:#000;} </style> <title>点击弹出层 ,点击弹出层外区域关闭弹出层jquery特效</title> <script type="text/javascript" src="http://jt.875.cn/js/jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("div.down").click...
代码如下:<!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" /> <title>jquery弹出层实例</title> <script type="text/javascript" src="http://www.jqueryajax.com/wp-content/uploads/2009/03/jquery-132min1.js"></script...
代码如下:<!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" /> <title>点击文字弹出层</title> <style type="text/css"> <!-- *{font-size:12px;font-family:Verdana, Geneva, sans-serif;line-height:14px}p{margin...
这两天要用到正好练练手,比想象中碰到的问题要多,比如: ie6背景透明 ie6居中显示 还有对js对象的理解 openID=显示按钮,conID=需要显示的div,closeID=关闭按钮 解决了: 1.可以遮挡ie6下的select元素 但是在ie6下div没有透明度 2.弹出的div可以一直在浏览器屏幕中间显示 问题: 1.目前不支持.class 只支持#id 2.需要显示的div需要自己设置css 3.在ie6下需要设置css 例如div {_position: absolute;_top: expression(documentElement.sc...
代码如下: $("#firefoxicon").click(function() { $("#window1").chinaz({ windowtitle: "firefox", windowpositiontop: "center", windowpositionleft: "center", windowwidth: 500, windowheight: 500, windowanimation: "easeoutcubic" });}); 轻松设置弹出层的效果,和弹出方...
代码如下:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JAVASCRIPT弹出层</title> <META http-equiv=Content-Type content="text/html; charset=utf-8"> <style> #popDiv { position: absolute; visibility: hidden; overflow: hidden; border: 2px solid #AEBBCA; background-colo...
方法一: [javascript] 代码如下:function hidePopup(){ var popUp = document.getElementById("popupcontent"); popUp.innerHTML=''; popUp.style.visibility = "hidden"; } 方法二 代码如下:flashObject.stop();[javascript] document.getElementById(popupcontent).stop();
之前做一个项目,感觉里面的弹出层做的挺好,但是代码结构有问题,这次用到了,重构了一下,改成jQuery的插件形式,并增加了reLoad的功能,感觉还不错,代码如下: 代码如下:(function($){ $.module={ _showCoverLayer:function(){//显示遮盖层 this.coverLayer=$("#TB_overlay"); var height=$(document).height()+"px"; var width=$(document).width()+"px"; if(this.coverLayer.length>0){ this.coverLayer.css({"visibility":...