js代码:


 <script type="text/javascript" src="script/jquery-1.3.1.min.js"></script>

<script type="text/javascript">

    $.fn.extend({

        Show : function(weight,height,btnCloseId){  //其中weight是要弹出窗口的宽度,height是要弹出窗口的高度,btnCloseId是关闭窗口的id

            $(this).css("width",weight+"px").css("height",height+"px");//设置消息框的大小

            $(this).slideDown(2000);//弹出


            $('#'+btnCloseId).click(

                function()

                {

                    $(this).parent().slideUp(2000);

                }

            );

        }

        });


   $(document).ready(function() {

                 $(".tanchuDiv").Show('346','166','divBtnClose');

                })

</script>


css:

z-index: 100; position: fixed; display: none; bottom: 0;right: 0; overflow: hidden; //要弹出窗口必须设置的css样式