동적으로 img 태그 생성하는 방법 > script

본문 바로가기

script

동적으로 img 태그 생성하는 방법

작성일 12-12-07 11:17

페이지 정보

작성자서방님 조회 510회 댓글 0건

본문

$('<img>', {
src: 'images/little.bear.png',
alt: 'Little Bear',
title:'I woof in your general direction',
click: function(){
alert($(this).attr('title'));
}
}).css({
cursor: 'pointer',
border: '1px solid black',
padding: '12px 12px 20px 12px',
backgroundColor: 'white'
}).appendTo('body');

댓글목록

등록된 댓글이 없습니다.

전체 846건 9 페이지
게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기