国产探花免费观看_亚洲丰满少妇自慰呻吟_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>

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

圖片精選

主站蜘蛛池模板: 兴宁市| 分宜县| 纳雍县| 灵璧县| 海门市| 揭东县| 滁州市| 深泽县| 大冶市| 陈巴尔虎旗| 嘉禾县| 岗巴县| 渭源县| 大石桥市| 石景山区| 道真| 紫云| 垦利县| 万州区| 宜章县| 上饶市| 衡东县| 三门峡市| 分宜县| 工布江达县| 葵青区| 滦南县| 区。| 东安县| 鄂托克旗| 化州市| 博罗县| 邵阳市| 翁牛特旗| 新建县| 山阳县| 白沙| 常德市| 新昌县| 旺苍县| 陈巴尔虎旗|