jQuery( ":image" )

· 8년 전 · 1987

jQuery( ":image" )

:image ~에 해당합니다. [type="image"]

추가 참고 사항 :

:imagejQuery 확장이며 CSS 사양의 일부가 아니기 때문에 사용하는 쿼리 :image는 기본 DOM querySelectorAll()메서드 에서 제공하는 성능 향상을 이용할 수 없습니다 . 최신 브라우저의 성능을 높이려면 [type="image"]대신 사용하십시오.
예:
모든 이미지 입력을 찾습니다.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>image demo</title>
  <style>
  textarea {
    height: 45px;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.10.2.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">
  <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 = $( "input:image" ).css({
  background:"yellow",
  border:"3px red solid"
});
$( "div" )
  .text( "For this type jQuery found " + input.length + "." )
  .css( "color", "red" );
$( "form" ).submit(function( event ) {
  event.preventDefault();
});
</script>
 
</body>
</html>

|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

개발자팁

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
jQuery 8년 전 조회 2,224
jQuery 8년 전 조회 2,417
jQuery 8년 전 조회 2,672
jQuery 8년 전 조회 1,845
jQuery 8년 전 조회 2,807
jQuery 8년 전 조회 2,330
jQuery
[jQuery]
8년 전 조회 1,695
JavaScript 8년 전 조회 2,762
jQuery
[jQuery]
8년 전 조회 1,485
jQuery 8년 전 조회 1,747
jQuery 8년 전 조회 1,831
jQuery 8년 전 조회 1,657
jQuery 8년 전 조회 1,670
jQuery
[jQuery]
8년 전 조회 1,353
jQuery 8년 전 조회 1,988
jQuery 8년 전 조회 2,436
jQuery
[jQuery]
8년 전 조회 1,722
jQuery 8년 전 조회 1,435
jQuery
[jQuery]
8년 전 조회 1,852
jQuery 8년 전 조회 5,441
기타 8년 전 조회 3,178
jQuery
[jQuery]
8년 전 조회 1,558
jQuery 8년 전 조회 1,730
jQuery 8년 전 조회 1,832
PHP 8년 전 조회 5,154
node.js 8년 전 조회 4,155
jQuery 8년 전 조회 2,227
jQuery 8년 전 조회 1,668
jQuery 8년 전 조회 1,220
jQuery 8년 전 조회 1,944
🐛 버그신고