w1100n
This site is best viewed in Google Chrome
6/11/2015 16:53 | Tag:

[javascript]

//tag name
$(obj).prop("tagName")

//array
var myArray=new Array()
var tr = obj.parents("tr");
var row = $("#template").clone();

//after() 方法在被选元素后插入指定的内容。

//语法:
$(selector).after(content)

newtr.find("td:gt(4)").remove();

tr.find(".ACTION_RATE").attr("rowspan");
tr.find(".ACTION_RATE").attr("rowspan","2");

$( "#dataTable tbody" ).on( "click", "tr", function() {
console.log( $( this ).text() );
});

//对象字面量</pre>
<pre><code>// 定义空对象
var dog = {};

// 添加一个属性
dog.name = "Benji";

// 添加一个方法
dog.getName = function () {
return dog.name;
};
[/javascript]

https://github.com/TooBug/javascript.patterns/blob/master/chapter3.markdown

<< Previous Posts Newer Posts >>
辽ICP备14012896