티스토리 뷰

Knowledge

jquery(제이쿼리) 값 가져오기

메디츠 2026. 7. 7. 12:13
반응형

<!-- jquery cdn -->
<script
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
<body>
<strong class="info_delivery">infoDelivery</strong>
</body>
<script>
$(document).ready(function() {
alert($('.info_delivery').text());
});
</script>

alert($('.info_delivery').val());
alert($('.info_delivery').text());
or
alert($('.info_delivery').html());
// jquery 관련해서 태그사이의 값을 가져오려면 text or html. val 아님.

반응형

'Knowledge' 카테고리의 다른 글

keepalived.conf  (0) 2026.07.07
haproxy.cfg  (0) 2026.07.07
javascript(자바스크립트) IP(아이피) get(받기)  (0) 2026.07.07
Android(안드로이드) Kotlin(코틀린) 관련  (0) 2026.07.07
javascript(자바스크립트) Cookie(쿠키)  (0) 2026.07.07
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2026/08   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
글 보관함