구매고객
판매자
솔루션별 질문
document.write 써서 테이블 만들었는데 이거css로 적용이 안돼네요 따로 방법이 없을까요?
되는데 안된다고 하시니.. 코드를 올려보세요
JS 다시 FM으로 공부해 보세요. ^!~
https://homzzang.com/b/js
답변을 작성하려면 로그인이 필요합니다.
객관적이지 않은 사유는 인정되지 않으며, 신고 권한이 제재될 수 있습니다.
0/200
신고 사유에 해당하지 않는 글을 신고하면 신고 권한이 제한될 수 있습니다.
이 회원의 커뮤니티 콘텐츠와 알림을 내 화면에서만 숨깁니다.
신고는 접수되지 않으며, 숨긴 회원은 내 정보에서 다시 보이게 할 수 있습니다.
신고할 글이 아닌가요? 이 회원만 숨기기
신고하기로 돌아가기
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style>
table {
border: 1px solid black;
}
</style>
<input type="text" id="a">
<input type="text" id="b">
<button onclick="btn()">클릭</button>
<script>
function btn() {
var x = document
.getElementById('a')
.value;
var y = document
.getElementById('b')
.value;
document.write("<table>");
document.write("<tr>");
document.write("<td>");
document.write(x);
document.write("</td>");
document.write("<td>");
document.write(y);
document.write("</td>");
document.write("</tr>");
document.write("</table>");
}
</script>
</body>
</html>