프로그래밍/Front (HTML, CSS, JS)
[JavaScript] DOCUMENT
꼬렙
2011. 7. 25. 18:54
728x90
ㅇ 기능
- 브라우저 상에 문자열을 출력
※ 단, 이 경우는 body의 모든 소스를 없애버리는 문제가 있으므로 신중히 사용해야 됨
- 글자, 배경 색 등 속성값을 알아낼 수 있음
- 임의로 값을 변경할 수도 있음
- 브라우저 상에 문자열을 출력
※ 단, 이 경우는 body의 모든 소스를 없애버리는 문제가 있으므로 신중히 사용해야 됨
- 글자, 배경 색 등 속성값을 알아낼 수 있음
- 임의로 값을 변경할 수도 있음
<html>
<head>
<title>DOCUMENT</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="JavaScript">
<!--
document.write("배경색 : " + document.bgColor + "<p>")
document.write("글자색 : " + document.fgColor + "<p>")
document.write("링크색 : " + document.linkColor + "<p>")
document.write("활성화된 링크색 : " + document.alinkColor + "<p>")
document.write("방문한 링크색 : " + document.vlinkColor + "<p>")
-->
</script>
</head>
<body bgcolor="#FFFFFF" text="빨간색">
</body>
</html>