天天看點

JQuery Easy UI 使用

JQuery EasyUI 使用筆記

最近一直需要快速搭建GPU的WEB admin,隻能借助于JQuery EasyUI,故将找到的資料摘抄如下

DataGrids 中添加ProgressBar

http://weichao202.iteye.com/blog/1731704

http://m.luojunchi.com/article/58.html

DataGrids 擴充Row, 折疊

http://www.2cto.com/kf/201208/147511.html

http://www.qeefee.com/article/S174

選中行事件

http://www.w3cschool.cc/jeasyui/jeasyui-datagrid-datagrid3.html

http://www.bubuko.com/infodetail-670634.html

判斷Udefined

http://www.cnblogs.com/mountain-mist/articles/1600995.html

(JS對話框)

http://www.cnblogs.com/xiaofengfeng/archive/2012/10/20/2732784.html

添加datagrid菜單

http://blog.csdn.net/dyllove98/article/details/8870119

Jquery 擷取父元素/子元素

http://www.jb51.net/article/41283.htm

JQuery flot畫圖

http://www.cnblogs.com/xiangniu/archive/2011/03/12/1982163.html

http://www.jqueryflottutorial.com/cn/how-to-make-jquery-flot-realtime-update-chart.html

http://www.jqueryflottutorial.com/cn/how-to-make-jquery-flot-line-chart-and-bar-chart.html

清除、添加style樣式

有些頁面樣式不規範,沒有寫在一個class裡,例如:

這種情況下清空style可以removeAttr()方法移除style屬性來實作

$("#show").removeAttr("style"); //ie,ff均支援
$("#show").attr("style","");   //ff支援,ie不支援 
           

JQuery 複制插入表格tr

function addtr(){
     var tr = $("#tb tr").eq(0).clone(); 
     tr.appendTo("#tb"); 
     //tr.insertBefore("#tb tr:last");
   }
<table id="tb">
    <tr>   </tr>    //  tr 的下标從 0 開始

     <tr>  </tr>
</table>
           

擷取text和html

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("#btn1").click(function(){
    alert("Text: " + $("#test").text());
  });
  $("#btn2").click(function(){
    alert("HTML: " + $("#test").html());
  });
});
</script>
</head>

<body>
<p id="test">This is some <b>bold</b> text in a paragraph.</p>
<button id="btn1">Show Text</button>
<button id="btn2">Show HTML</button>
</body>
</html>
           

Jquery JSON數組、對象操作

var datas=[];
var data = {};
data["id"] = 1;
data["name"] = "test" + 1;
data["age"] = 1 * 2;
datas.push(data);
var jsonString = JSON.stringify(datas); /*JSON轉字元串*/ //[{"id":,"name":"test1","age":}]
msg.innerHTML=jsonString;
var epc=eval("("+jsonString+")");
alert(epc[].id);
           

JSON http://www.oschina.net/code/snippet_242050_21186

JQuery JSON緩存 http://blog.csdn.net/lonestar555/article/details/11337527

JQuery JSON周遊

http://caibaojian.com/jquery-each-json.html

http://blog.csdn.net/happy664618843/article/details/7934221

JQuery ajax跨域

http://www.oschina.net/question/209440_75040

JQuery定時器

http://www.cnblogs.com/couxiaozi1983/archive/2012/04/15/2450273.html

http://blog.csdn.net/xiayuzheng/article/details/9192963