Attributes - 맵(컬렉션)으로 다중 속성 지정
.NET프로그래밍/jQuery 1.3.2 2009. 11. 10. 09:56 |
[MapCollection.htm]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>맵(컬렉션)으로 다중 속성 지정</title>
<script src="../js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#com").attr({
src: "../ProductImages/COM-01.jpg",
alt: "컴퓨터",
title: "좋은컴퓨터"
});
});
</script>
</head>
<body>
<img id="com" />
</body>
</html>
-------------------------------------------------------------------------------------
[실행결과]
'.NET프로그래밍 > jQuery 1.3.2' 카테고리의 다른 글
Attributes - 텍스트 값 가져오기 및 설정 (0) | 2009.11.10 |
---|---|
Attributes - 특정 속성을 지우기 (0) | 2009.11.10 |
Attributes - 마우스 오버시 큰 이미지 보여주기 (1) | 2009.11.10 |
Attributes - DOM요소의 attribute 읽어오기 (0) | 2009.11.09 |
Form관련 jQuery 선택기 명령어 - :selected (드롭다운리스트에서 선택한 값 가져오기) (0) | 2009.11.09 |