jQuery input name으로 선택

(JQuery input name으로 선택하기에서 넘어옴)

jQuery getElementById
jQuery 이름으로 찾기
jQuery name으로 핸들 얻기
jQuery 폼 요소 이름으로 선택

²==예제 소스==

<input type='text' name='hello' value='world' />
<button id='test'>이름으로 선택 테스트</button>

<script src="//code.jquery.com/jquery.min.js"></script>
<script>
$("#test").click(function() {
  alert( $("input[name={{hello}}{{{{}}}}]").attr("value") );
});
</script>
→ 버튼을 누르면 hello라는 이름을 가진 input text의 value인 world이 출력된다.

같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}