답변 1개
채택된 답변
+20 포인트
this 로 연결시킬 때는 해당 개체가 전달 되었을 때 가능합니다.
Copy
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script><script type="text/javascript">$(function () { //var b = $(this).attr("href"); var b = $("#link01").attr("href"); alert(b);});</script><a id="link01" href="http://www.google.com" title="google 사이트로 이동">link</a>
답변을 작성하려면 로그인이 필요합니다.