最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

:radio Selector

radio selector

version added: 1.0jQuery(':radio')

描述: 選擇所有類型為單選框的元素。

$(':radio')等價于$('[type=radio]')。如同其他偽類選擇器(那些以“:”開始)建議前面加上一個標(biāo)記名稱或其他選擇器;否則,通用選擇("*")被默認(rèn)使用。換句話說$(':radio') 等同于 $('*:radio'),所以應(yīng)該使用$('input:radio')。

要選擇一個單選按鈕相關(guān)的設(shè)置,你可以使用。$('input[name=gender]:radio')

Example:

Finds all radio inputs.

<!DOCTYPE html>
<html>
<head>
  <style>
  textarea { height:25px; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <form>
    <input type="button" value="Input Button"/>
    <input type="checkbox" />

    <input type="file" />
    <input type="hidden" />
    <input type="image" />

    <input type="password" />
    <input type="radio" name="asdf" />
    <input type="radio" name="asdf" />

    <input type="reset" />
    <input type="submit" />
    <input type="text" />

    <select><option>Option<option/></select>
    <textarea></textarea>
    <button>Button</button>
  </form>

  <div>
  </div>
<script>

    var input = $("form input:radio").wrap('<span></span>').parent().css({background:"yellow", border:"3px red solid"});
    $("div").text("For this type jQuery found " + input.length + ".")
            .css("color", "red");
    $("form").submit(function () { return false; }); // so it won't submit

</script>

</body>
</html>

Demo:

jQuery 1.6 API 中文版腳本之家整理、修訂 (2011年6月)
垣曲县| 自治县| 修武县| 汝州市| 龙川县| 大竹县| 崇义县| 西安市| 兴安盟| 通城县| 金秀| 汕尾市| 新和县| 长宁县| 葵青区| 厦门市| 松滋市| 思茅市| 屏东市| 星子县| 贵阳市| 亚东县| 弥勒县| 玛曲县| 大同县| 大港区| 兴海县| 阿勒泰市| 翁源县| 青龙| 道真| 海城市| 西盟| 当雄县| 大渡口区| 陆川县| 石门县| 汉源县| 云霄县| 家居| 基隆市|