最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

EasyUI創(chuàng)建對(duì)話框的兩種方式

 更新時(shí)間:2016年08月23日 10:33:36   作者:Java大S  
對(duì)話框(Dialog)是一個(gè)特殊的窗口(window),可以包含在頂部的工具欄和在底部的按鈕。接下來(lái)通過本文給大家介紹easyui創(chuàng)建對(duì)話框的兩種方式,非常不錯(cuò),感興趣的朋友一起看下吧

對(duì)話框(Dialog)是一個(gè)特殊的窗口(window),可以包含在頂部的工具欄和在底部的按鈕。默認(rèn)情況下,對(duì)話框(Dialog)不能改變大小,但是用戶可以設(shè)置 resizable 屬性為 true,使其可以改變大小。

這種就是對(duì)話框了。

EasyUI有兩種創(chuàng)建方式:

第一種:通過已存在的DOM節(jié)點(diǎn)元素標(biāo)簽創(chuàng)建

<!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>無(wú)標(biāo)題文檔</title>
<!-- 導(dǎo)入js文件 -->
<!-- 導(dǎo)入jquery核心js文件 -->
<script type="text/javascript" src="jquery.min.js"></script>
<!-- 導(dǎo)入easyui核心js文件 -->
<script type="text/javascript" src="jquery.easyui.min.js"></script>
<!-- 導(dǎo)入本地語(yǔ)言的js文件-->
<script type="text/javascript" src="locale/easyui-lang-zh_CN.js"></script>
<!-- 導(dǎo)入css -->
<!-- 導(dǎo)入easyui的默認(rèn)css文件-->
<link type="text/css" rel="stylesheet" href="themes/default/easyui.css"/>
<!-- 導(dǎo)入圖標(biāo)的css文件 -->
<link type="text/css" rel="stylesheet" href="themes/icon.css"/>
</head>
<body>
<div id="dd" class="easyui-dialog" title="我的對(duì)話框" style="width:400px;height:200px;" data-options="iconCls:'icon-save',resizable:true,modal:true"> 
提示內(nèi)容
</div> 
</body>
</html>

第二種:通過js動(dòng)態(tài)創(chuàng)建對(duì)話框

<!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>無(wú)標(biāo)題文檔</title>
<!-- 導(dǎo)入js文件 -->
<!-- 導(dǎo)入jquery核心js文件 -->
<script type="text/javascript" src="jquery.min.js"></script>
<!-- 導(dǎo)入easyui核心js文件 -->
<script type="text/javascript" src="jquery.easyui.min.js"></script>
<!-- 導(dǎo)入本地語(yǔ)言的js文件-->
<script type="text/javascript" src="locale/easyui-lang-zh_CN.js"></script>
<!-- 導(dǎo)入css -->
<!-- 導(dǎo)入easyui的默認(rèn)css文件-->
<link type="text/css" rel="stylesheet" href="themes/default/easyui.css"/>
<!-- 導(dǎo)入圖標(biāo)的css文件 -->
<link type="text/css" rel="stylesheet" href="themes/icon.css"/>
</head>
<body>
<!--<div id="dd" class="easyui-dialog" title="我的對(duì)話框" style="width:400px;height:200px;" data-options="iconCls:'icon-save',resizable:true,modal:true"> 
提示內(nèi)容
</div> --> 
<div id="dd">對(duì)話框內(nèi)容</div>
<script type="text/javascript">
$("#dd").dialog({
title: '我的對(duì)話框', //標(biāo)題
collapsible:true, //是否可折疊
minimizable:true, //最小化按鈕
maximizable:true,//最大化按鈕
resizable:true,//是否改變窗口大小
width: 400, 
height: 200, 
closed: false, 
cache: false, 
href: 'beautiful.html', 
});
</script>
</body>
</html>

以上所述是小編給大家介紹的EasyUI創(chuàng)建對(duì)話框的兩種方式,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論

明溪县| 双流县| 平远县| 隆林| 嘉兴市| 陕西省| 庐江县| 太保市| 平泉县| 绩溪县| 诸城市| 大余县| 玉山县| 榆树市| 河北省| 西藏| 江孜县| 左贡县| 宝兴县| 嵩明县| 施秉县| 鄄城县| 三都| 淳化县| 孝昌县| 西乡县| 樟树市| 南投市| 湟源县| 大关县| 虎林市| 柳州市| 霍邱县| 桐柏县| 故城县| 随州市| 达州市| 桃园县| 嘉荫县| 连云港市| 江孜县|