国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

用jquery中插件dialog實現彈框效果實例代碼

2024-05-06 15:55:15
字體:
來源:轉載
供稿:網友
這篇文章介紹了jquery中插件dialog實現彈框效果實例代碼,有需要的朋友可以參考一下

復制代碼 代碼如下:


<!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">
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
</style>
<script type="text/javascript" language="javascript" src="jquery-1.7.1.min.js">
</script>
<script type="text/javascript" language="javascript" src="jquery-ui-1.8.18.custom.min.js">
</script>
<link href="ui-lightness/jquery-ui-1.8.18.custom.css"/>
<script type="text/javascript" language="javascript">
$(function(){
    $("#dialog").dialog({
        autoOpen:false,
        buttons:[{
            text:"ok",
            click:function(){
                $("#dialog").dialog("close");
                }
            },
            {
            text:"cancal",
            click:function(){
                $("#dialog").dialog("close");
                }
            }
            ],
            position:"top",//彈出位置
            width:600, //窗口寬度
            height:200,
            drag:function(){
                alert("你干拽我試試");
                }

        
        });
    $("#dialog_link").click(function(){
        $("#dialog").dialog("open");
        });
    })
</script>
</head>

<body>
<a href="#"><span></span>Open Dialog</a>
<!--對話框$("#dialog").dialog()他就是一個對話框,在頁面中就會隱藏-->
<div "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">
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
</style>
<script type="text/javascript" language="javascript" src="jquery-1.7.1.min.js">
</script>
<script type="text/javascript" language="javascript" src="jquery-ui-1.8.18.custom.min.js">
</script>
<link href="ui-lightness/jquery-ui-1.8.18.custom.css"/>
<script type="text/javascript" language="javascript">
$(function(){
 $("#dialog").dialog({
  autoOpen:false,
  buttons:[{
   text:"ok",
   click:function(){
    $("#dialog").dialog("close");
    }
   },
   {
   text:"cancal",
   click:function(){
    $("#dialog").dialog("close");
    }
   }
   ],
   position:"top",//彈出位置
   width:600, //窗口寬度
   height:200,
   drag:function(){
    alert("你干拽我試試");
    }

  });
 $("#dialog_link").click(function(){
  $("#dialog").dialog("open");
  });
 })
</script>
</head>

<body>
<a href="#"><span></span>Open Dialog</a>
<!--對話框$("#dialog").dialog()他就是一個對話框,在頁面中就會隱藏-->
<div title="Hi">
hello
</div>
</body>
</html>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 通榆县| 安塞县| 旬阳县| 沧州市| 延边| 商都县| 隆德县| 台山市| 石泉县| 秀山| 浮梁县| 万山特区| 运城市| 奉贤区| 积石山| 沙田区| 西畴县| 宿州市| 博客| 衡东县| 安徽省| 玉门市| 巴塘县| 铜山县| 凤山县| 阿拉尔市| 龙岩市| 泾源县| 师宗县| 松滋市| 自贡市| 津市市| 曲阜市| 黄龙县| 玉田县| 桐梓县| 方山县| 横峰县| 怀宁县| 新田县| 舟山市|