1. 程式人生 > >jsp頁面的彈出框(art.dialog)例子

jsp頁面的彈出框(art.dialog)例子

例:

<input type="button" id="add_btn" value="新建子目錄" mice-btn="icon-add">

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="artDialog.js"></script>

                                           // js見上傳的資源

<script type="text/javascript">

         $("#add_btn").bind('click',function(){
                   art.dialog({
                  lock: true,

                                    // (彈出框時後面的主頁面是否“鎖”起來(即蒙上了一個陰影層

                                          true:代表鎖起來 false:反之)
                  title: '新建子目錄',

                                   // (彈出框的標題)

                content:
                           '<'+'iframe id="newFream" frameborder="0"

                                                                 src="----" height="100" width="270"></'+'iframe>'
                                    // (frameborder="0" : 無框 src:裡寫需要展示的內容連結,可以是個頁面)
                 id: 'EF893L',
                 height:100, 

                                //彈出框的高度
                  width:300,

                              //彈出框的寬度
                 opacity: .10,

                                          //陰影層顏色的深淺

        ok:function(){
                     window.location.href = "-----";

                      // (點選 okVal此操作名的後主頁面的動作,如重新整理或。。。。)
        },
        okVal:'關閉'

                     // (右下角所顯示的操作名)
     });
});

</script>

如圖: