|
系列文章導航:
jQuery-Selectors(選擇器)的使用(一、基本篇)
jQuery-Selectors(選擇器)的使用(二、層次篇)
jQuery-Selectors(選擇器)的使用(三、簡單篇)
jQuery-Selectors(選擇器)的使用(四--五、內(nèi)容篇&可見性篇)
jQuery-Selectors(選擇器)的使用(六、屬性篇)
jQuery-Selectors(選擇器)的使用(七、子元素篇)
jQuery-Selectors(選擇器)的使用(八、表單篇)
jQuery-Selectors(選擇器)的使用(九、表單對象屬性篇)
1. :input用法
定 義:匹配所有 input, textarea, select 和 button 元素
返回值:Array
實 例:將ID為"div_a1"的DIV中所有的input元素的背景色改為紅色(radio,checkbox元素的狀態(tài)改為選中)
代 碼: $("#div_a1 :input").css("background-color","red");$("#div_a1 :input").attr("checked",true); //點擊按鈕一將執(zhí)行這句代碼DIV ID="div_a1"
span ID="span_1"
it知識庫:jQuery-Selectors(選擇器)的使用(八、表單篇),轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。