아래 코드에서 두 개의 대화 상자가 표시되지만 페이지의 bgColor는 변경되지 않습니다. JavaScript에서 글꼴/색상 변경이 적용되지 않는다는 표준이 있습니까?Javascript Document.bgColor가 작동하지 않습니다.
<html>
<head>
</head>
<body bgColor="GRAY">
<script type="text/javascript">
document.write("This message is written by JavaScript");
alert('Am here');
alert('Am here again');
document.bgcolor="WHITE";
</script>
</body>
</html>
굉장합니다. 나는이 책을 새 책에서 얻었고이 책이 어떻게 작동하는지 궁금해하고있었습니다. 나는 크롬, IE 및 FF에서 시도했다. 고마워. –