Kotak dialog (dialog) adalah jendela khusus (jendela) yang dapat disertakan dalam bilah alat di bagian atas dan tombol di bagian bawah. Secara default, kotak dialog (dialog) tidak dapat mengubah ukurannya, tetapi pengguna dapat mengatur properti yang dapat diubah menjadi True sehingga dapat mengubah ukurannya.
Ini adalah kotak dialog.
Easyui memiliki dua cara untuk membuat:
Yang pertama: buat melalui tag elemen node dom yang ada
<! Doctype html public "-// w3c // dtd xhtml 1.0 transisi // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"><html xmlns = "http://www.w3.org/1999/xhtml"> <adept> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> unt titled document </title> <!-impor js file-> <judul jitery> unt titled document </title> <!-impor js file-> <prips JS! type = "Text/JavaScript" src = "jQuery.min.js"> </script> <!-impor file inti js core mudah-> <script type = "text/javascript" src = "jQuery.easyUi.min.js"> </script> <!-Impor file js dalam bahasa lokal-> <min.min.js "> </script> <! SRC = "LOCAL/EYEUI-LANG-ZH_CN.JS"> </script> <!-Impor CSS-> <!-Impor file CSS Default Easyi-> <tautan tipe = "Teks/CSS" Rel = "Stylesheet" HREF = "Tema/Default/EasyUi.css"/> <! rel = "stylesheet" href = "tema/icon.css"/> </head> <body> <v id = "dd" data-options = "iconCls: 'ikon-save', dapat diproduksi kembali: true, modal: true"> konten prompt </div> </body> </html>
Jenis kedua: Buat kotak dialog secara dinamis melalui JS
<! Doctype html public "-// w3c // dtd xhtml 1.0 transisi // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"><html xmlns = "http://www.w3.org/1999/xhtml"> <adept> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> unt titled document </title> <!-impor js file-> <judul jitery> unt titled document </title> <!-impor js file-> <prips JS! type = "Text/JavaScript" src = "jQuery.min.js"> </script> <!-impor file inti js core mudah-> <script type = "text/javascript" src = "jQuery.easyUi.min.js"> </script> <!-Impor file js dalam bahasa lokal-> <min.min.js "> </script> <! SRC = "LOCAL/EYEUI-LANG-ZH_CN.JS"> </script> <!-Impor CSS-> <!-Impor file CSS Default Easyi-> <tautan tipe = "Teks/CSS" Rel = "Stylesheet" HREF = "Tema/Default/EasyUi.css"/> <! rel="stylesheet" href="themes/icon.css"/></head><body><!--<div id="dd" data-options="iconCls:'icon-save',resizable:true,modal:true"> Prompt content</div> --> <div id="dd"> Dialog content</div><script type="text/javascript">$("#dd").dialog({title: 'My Dialog', //Title collapse:true, //Is it foldable minimizable:true, //Minimize button maximizable:true,//Maximize button resizable:true,//Whether to change the window size width: 400, height: 200, closed: false, cache: false, href: 'cantik.html',}); </script> </body> </html>Di atas adalah dua cara untuk membuat kotak dialog di easyui yang diperkenalkan kepada Anda. Saya harap ini akan membantu Anda. Jika Anda memiliki pertanyaan, silakan tinggalkan saya pesan dan editor akan membalas Anda tepat waktu. Terima kasih banyak atas dukungan Anda ke situs web Wulin.com!