русский  עברית
tadam logo
Нашли ошибку в тексте?
Отметьте её курсором и нажмите
Ctrl + Enter
Проверка орфографии Xhtml.co.il
Orphus system
Рассылка
Присоединитесь к списку рассылки для получения последних новостей

Введите адрес электронной почты:

селектор image

Описание: Соответствует всем элементам ввода типа image.

jQuery(':image')

Добавлена в версию: 1.0

Примеры

Поиск всех элементов ввода типа image.
    var input = $(":image").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
Результат выполнения кода выше:
Полный код:
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
  <script>
  $(document).ready(function(){
    var input = $(":image").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>
  <style>
  textarea { height:45px; }
  </style>
</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" />
    <input type="reset" />
    <input type="submit" />
    <input type="text" />
    <select><option>Option<option/></select>
    <textarea></textarea>
    <button>Button</button>
  </form>
  <div>
  </div>
</body>
</html>
Была ли эта информация полезной?
   

Комментарии