easy Ui + Jquery 彈窗 的實現,uijquery

來源:互聯網
上載者:User

easy Ui + Jquery 彈窗 的實現,uijquery

easy Ui 的彈窗有很多種 

我就來說下我實現的一種感覺用起來很方便的

首先 引用的easy ui JS

<script type="text/javascript" src="../js/jquery-1.8.2.min.js"></script><script type="text/javascript" src="../js/easyUI/jquery.easyui.min.js"></script>
一樣還有他的樣式CSS檔案也要引用

<link rel="stylesheet" type="text/css" href="../js/easyUI/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="../js/easyUI/themes/icon.css"/> 
下面我們彈窗定義個DIV 

 <div id="win" style="display:none;"> 彈窗的內容</div>
這裡需要注意的是 div的樣式要隱藏

 function openwindow(id,titlename,vwidth,vheight){     $('#'+id).window({                width:vwidth,                height:vheight,                modal:true ,    title:titlename,    collapsible:false,    minimizable:false,//最小化    maximizable:false,//最大化    resizable:false    });      }
這是我們的JS彈窗的方法 

 id  就是你DIV的ID

titlename  就是你視窗最上面顯示的  比如 新增使用者  修改使用者

vwidth  和 vheight 是你彈窗的大小

我們開始看看 JS裡面怎麼調用

首先在調用的時候我們要把DIV樣式 display=block

document.getElementById("win").style.display="block";    openwindow('win','修改部門',300,340);
同樣 關閉視窗也很簡單

$('#win').window('close');
好啦 關於彈窗那裡面的屬性有很多 我就不一一說明了 可以去easy ui的官網上找找 








jquery easy ui怎上傳附件?

<input type="file" value="上傳檔案" />
 
誰有S2SH結合Jquery easy UI 的項目demo或者Jquery easy UI結合別的從後台讀取資料進行資料操作的發我郵

其實很簡單, 你看看 jquery api 中的 ajax請求就好了
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.