2
나는 새로 고침 할 때마다 임의의 배경을 보여주는 코드를 가지고 있지만, 모든 이미지를 width100 %와 heigth 100 % 만들 수있는 방법을 모릅니다. 내 코드는 다음과 같습니다.자바 스크립트 무작위 배경 이미지 크기
<html>
<head>
<script type="text/javascript">
var totalCount = 3;
function ChangeIt()
{
var num = Math.ceil(Math.random() * totalCount);
document.body.background = 'bg'+num+'.png';
document.body.style.backgroundRepeat = "repeat";// bg repeat.
}
</script>
</head>
<body>
----
</body>
<script type="text/javascript">
ChangeIt();
</script>
</html>
아이디어가 있습니까?
나는 실제로 당신의 요점을 얻지 못합니다. – yakiang