Selector
Dom对象选择器。返回一个como对象
Como对象可以理解为原生Dom(Element)的集合,也就是说 $("#test")[0] = document.getElementById("test");
only版仅支持Como("#test"),不支持$("#test");
$("#id")					//通过id取对象
$(".class")					//通过className取对象
$("tag")					//直接通过tagName取对象
$(".test #test1")
$(".test div")					//所有子孙对象
$(".test>div")					//仅包括子对象
$(".test a[attribute]")				//存在某个属性
$(".test a[attribute=value]")			//指定属性值
Como(document.body).pos()			//返回当前页面滚动条的坐标
 
como对象方法
size get each index attr prop remove css text html val append prepend before after down up upWithMe on un out unout left top pos height width show hide toggle focus prev prevAll next nextAll first last children parent hasClass addClass removeClass removeAttr anim
size
获取选择的Dom集合的数量
$("span").size();
get
获取选择的Dom集合的第几个,返回Dom Element对象
$("span").get(1);		//获取第2个Dom对象
each
循环Dom集合并执行
$("span").each(function(el){
	alert(el.html());
});
index
返回指定Dom在选择Dom集合里面的位置,参数支持原生Dom和como对象
$("span").index($("#test1"));
$("span").index(document.getElementById("test1"));
attr
获取或设置对象的attribute属性值
$("#test").attr('class');
$("#test").attr('class', 'className');
prop
获取或设置对象的prototype属性值
$("#test").prop('className');
$("#test").prop('className', 'className');
remove
在Document中移除此对象
$("#test").remove();
css
获取或设置对象的css样式值
$("#test").css('display');
$("#test").css('display', 'none');
$("#test").css('opacity');
$("#test").css('opacity', 0.5)
text
获取或设置对象的文本值
$("#test").text();
$("#test").text("Hello World!")
html
获取或设置对象的HTML值
$("#test").html();
$("#test").html("Hello World!")
val
获取或设置表单对象的值
$("input").val();
$("input").val('Hello');
$("radio").val();
$("checkbox").val();
append
在对象的最后一个子节点插入
$("#test").append("<span>Hello World!</span>");
prepend
在对象的第一个子节点插入
$("#test").prepend("<span>Hello World!</span>");
before
在对象的前插入
$("#test").before("<span>Hello World!</span>");
after
在对象的后插入
$("#test").after("<span>Hello World!</span>");
down
向下查找,查找所有子节点
$("#test").down("div");
up
向上查找,查找所有父节点
$("#test").up("div");
upWithMe
向上查找,查找所有包括自己的父节点
$("#test").upWithMe("div");
on
给对象绑定事件
$("#test").on("click", function(){});
un
给对象解除事件
$("#test").un("click", function(){});
//解除的Function必须与绑定时的Function一样(在内存中的地址一样)
out
绑定对象范围之外触发的事件
$("#test").out("click", function(){});		//触发不解除
$("#test").out("click", function(){}, true);	//触发后解除
unout
解除对象范围之外触发的事件

	
left
获取对象的横坐标
$("#test").left()
top
获取对象的纵坐标
$("#test").top()
pos
获取对象的坐标,返回格式{left: 500, top: 500}
$("#test").pos()
height
获取或设置对象的高度
$("#test").height()
$("#test").height(500)
width
获取或设置对象的宽度
$("#test").width()
$("#test").width(500)
show
显示对象
$("#test").show()
hide
隐藏对象
$("#test").hide()
toggle
更改对象可见样式,之前可见改隐藏,之前隐藏改可见
$("#test").toggle()
focus
表单对象获取焦点
$("#input1").focus()
prev
获取该节点前面的一个节点
$("#test").prev()
prevAll
获取该节点前面的所有节点
$("#test").prevAll()
next
获取该节点后面的一个节点
$("#test").next();
nextAll
获取该节点后面的所有节点
$("#test").nextAll();
first
获取第一个子节点
$("#test").first();
last
获取最后一个子节点
$("#test").last();
children
获取子节点
$("#test").children();
parent
获取父节点
$("#test").parent();
hasClass
检查对象是否含有某个className
$("#test").hasClass('classname');
addClass
添加某个className
$("#test").addClass('classname');
removeClass
删除某个className
$("#test").removeClass('classname');
removeAttr
删除某个属性
$("#test").removeAttr('id');
anim
对象执行动画,相当于como.anim($("#test")),可参考Anim
$("#test").anim().to('height', '50px').go();