手机版

jQuery弹出层插件popShow用法示例

时间:2021-09-06 来源:互联网 编辑:宝哥软件园 浏览:

本文实例讲述了jQuery弹出层插件popShow用法。分享给大家供大家参考,具体如下:

popShow弹出层

图1.1 弹出层效果

1、引入射流研究…和半铸钢钢性铸铁(铸造半钢)文件

链接href='popShow.css' rel='样式表type=' text/CSS '/script src=' http :/js/common/jquery。量滴js ' type=' text/JavaScript '/script script src=' http : pop show。js ' type=' text/JavaScript '/script注意:这里需要引入JQuery库文件。

2、编写超文本标记语言代码

div id=' SwinLogon ' style=' display : none;'div class=' pWrap ' table class=' g _ form ' tr th class=' g-form-label ' span class=' g-star ' */span用户名/t输入id=' Txtusername ' type=' text '/TD/tr t span class=' g-star ' */span密码/th TD输入id=' TxTPsw '类型='密码'/TD/tr th/th TD输入类型='按钮'值='登录//td /tr /table /div/div3、popShow的使用

(1) 打开弹出层

popShow({ title: '用户登录,ele: ' # swinLogin ',宽度: 468 });//打开弹出层参数说明:

标题: '用户登录',//标题ele: '#divID ',//目标id,必填html: 'divp提交成功/p/div ',//支持超文本标记语言代码,若填写此项埃莱可为空宽度: 700,//非必填hide: '#closeswin'//关闭按钮id,非必填

(2) 关闭弹出层

popHide();//关闭弹出层附件

附件1:popShow.js

函数流行音乐表演(obt){ var WP=$(' div id=\ ' g-pop win \ '/div ').appendo(' body '),ms=$(' div class=\ ' g-pop win-mask ' iframe frame border=\ ' 0 ' scrolling=\ ' no \ '/iframe/div ').appendo(WP),TB=$(' table class=\ ' g-pop win-box \ '/table ').appendo(WP),tr=$('tr/tr ').附录(TB),td=$('td/td ').appendo(tr),bx=$(' div class=\ ' g _ pop win ' style=\ ' margin 33600 auto;宽度宽度:700px\'/div ').appendo(TD),ba=$('div class=\'tit\'/div ').appendo(bx),rb=$('b class='g-f-r ').appendo(ba),HD=$(' a class=' close g-f-r ' title='点击关闭/a ').appendTo(ba),st=$('strong/strong ').appendo(ba),cn=$('div class=\'con\'/div ').附录(bx),ss;if (obt.ele) { ss=$(obt.ele).显示()。appendo(cn)} else if(obt . html){ cn。追加(obt。html)} if(obt。宽度){ bx。宽度(obt。宽度)} if(obt。高度){ bx。高度(obt。高度)} if(obt。标题)。title)} else { ba。hide()}高清。添加(obt。隐藏| | ' # swin _ hide ').单击(function(){ popHide();});窗户。pophide=function(){ if(obt。埃勒){ ss。隐藏().appendo(' body ')} WP。remove()};}附件2:popShow.css

#g-popwin,g-popwin-mask .g-popwin-mask iframe .g-pop win-box {高度: 100%;宽度: 100%;}.g-popwin-mask .g-pop赢盒{左: 0;位置:固定;top : 0;z指数: 100;}.g-pop win-mask {背景:无}重复滚动0 0 # 000000;opacity: 0.3 }。g-pop win-mask iframe { opa city 3360 0;}.g _ pop win {底色: # FFFFFFborder: 1px固体# C6C6C6}。g_popwin .乳头。关闭{背景: URL('/images/swin close。gif ')无重复滚动0 0透明;光标:指针;高: 14px边距-top : 8px;宽度: 14px}.g_popwin .tit b { display:块;高度: 30px宽度: 10px}.g_popwin .tit {背景:无否-重复滚动0 0 # f2f2f2边框-底部: 1px实心# C6C6C6height: 30px线高: 30px飞越:隐藏;padd : 0 10pxfont : 12px/1.5 em Arial,Tahomacolor: # 111111线高:30 px}.g_popwin .tit strong { display:块;高度: 27px宽度: 220 px}.g-f-r { float : right;}附件3:关闭按钮图标(swinclose.gif)

更多关于jQuery相关内容感兴趣的读者可查看本站专题: 《jQuery常用插件及用法总结》 、 《jquery中Ajax用法总结》 、 《jQuery表格(table)操作技巧汇总》 、 《jQuery拖拽特效与技巧总结》 、 《jQuery扩展技巧总结》 、 《jQuery常见经典特效汇总》 、 《jQuery动画与特效用法总结》 及《jquery选择器用法总结》

希望本文所述对大家jQuery程序设计有所帮助。

版权声明:jQuery弹出层插件popShow用法示例是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。