jQuery iframe URL 변경

1 개요[ | ]

jQuery iframe src 변경
jQuery iframe URL 주소 변경
<style>
#my_frame { width: 400px; height: 300px; }
</style>

<div>
  <button onclick='open_in_frame("https://m.naver.com")'>네이버</button>
  <button onclick='open_in_frame("https://en.m.wikipedia.org")'>영어 위키백과</button>
  <button onclick='open_in_frame("https://ko.m.wikipedia.org")'>한국어 위키백과</button>
</div>
<iframe id='my_frame'></iframe>

<script src="//code.jquery.com/jquery.min.js"></script>
<script>
function open_in_frame(url) {
	$('#my_frame').attr('src', url);
}
</script>

2 같이 보기[ | ]

3 참고[ | ]

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