//java.js
Copy
<script>
document.write("<a href='#' target='_blank'>");
document.write("<img src='https://google.com/logo.png'>");
document.write("</a>");
</script>
//123.html
Copy
<html>
<head>
<title></title>
</head>
<body>
<script src='ad_01.js'></script>
</body>
</html>
위와 같이 js파일을 불러오면 이미지 파일이 표시안되더라구요.
어디에 문제가 있는걸까요? ㅠ
|
답변 1개 / 댓글 2개
채택된 답변
+20 포인트
2020-01-07 (화) 21:31:05
js 파일엔 <script> 태그 없애시면 됩니다 ^^
답변에 대한 댓글 2개
답변을 작성하려면 로그인이 필요합니다.