aoaosheng 发表于 2013-2-7 16:48:08

jQuery 选择器

参考资料:http://www.w3school.com.cn/jquery/jquery_ref_selectors.asp
 
jQuery 选择器
#id $("#lastname") id=lastname 的元素.class $(".intro") 所有 class="intro" 的元素element   $("p")   所有 <p> 元素 
document.getElementById('searchProject').style.position='absolute';document.getElementById('searchProject').style.display='none';  
css() 方法返回或设置匹配的元素的一个或多个样式属性。
$("#project_id").css("display","none");$("p").css({"color":"white","background-color":"#98bf21","font-family":"Arial","font-size":"20px","padding":"5px"}); 
attr() 方法设置或返回被选元素的属性值。
$("#monday").attr("tabindex",monday_tabindex);  
text() 方法返回或设置被选元素的内容 (inner HTML)。
$("#project_id").text(""); 
 "00:00" replace by "24:00" in input field
var bookingTo_list = $("input");for(var i=0;i<bookingTo_list.length;i++){var toValue = bookingTo_list.value;if(toValue=="00:00"){bookingTo_list.value = "24:00";}} 
页: [1]
查看完整版本: jQuery 选择器