xpages 右下角弹出窗口

  最近使用到在xpages(如果想在form中使用一类似的,本质就是html的js,css功能)的右下角弹出个窗口,类似网上很多教程,但不有些不合适,把一个源码更改了,具体在哪个网页的源码不记得了,修改能自动关闭的,其它配色自己更改

1)先要引用jquery,这里不再提示,看以前教程

<style>

        .tanchuDiv1{

            z-index: 100;

            position: fixed;

            display: none;

            bottom: 5px;

            right: 5px;

            overflow: hidden;

            background-color: rgb(229,93, 64);

            }

          .tanchuDiv1 > span {

               color: #fff;

               cursor: pointer;

               padding: 02.8px;

               position:absolute;

               right: 1px;

               top: 1px;

           }

    </style>

   

<div class="tanchuDiv1">

    <span id="divBtnClose">X</span>

</div>


<script type="text/javascript">
$.fn.extend({
        Show :function(weight,height,btnCloseId,autoclose,secodetime){
        //其中weight是要弹出窗口的宽度,height是要弹出窗口的高度,btnCloseId是关闭窗口的id
          $(this).css("width",weight+"px").css("height",height+"px");//设置消息框的大小
           $(this).slideDown(2000);//弹出
         
            $('#'+btnCloseId).click(
                function()
                {
                   $(this).parent().slideUp(2000);
                }
            );
           
            //指导时间内自动关闭
            if(autoclose){
              setTimeout(function() {
                  $('#'+btnCloseId).click();
              }, secodetime*1000);
 
            }
        }
        });
 
 
    //加载事件
        $(window).load(function() {
             $(".tanchuDiv1").Show('350','250','divBtnClose',true,5);
        });
  </script>




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weijia3624

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值