작업 소스들

웹사이트에 랜덤배너를 넣어보자

June 2020. 12. 31. 23:50
<!-- 랜덤배너출력 -->
<script language="JavaScript" type="text/JavaScript">
   var banner = new Array();

    banner[0]="<a href='#'><img src='#' border='0' width='100%' height='100%'></a>";
    banner[1]="<a href='#'><img src='#' border='0' width='100%' height='100%'></a>";
    banner[2]="<a href='#'><img src='#' border='0' width='100%' height='100%'></a>";
  
    var random_banner = Math.floor(Math.random()*(banner.length));
</script>

<script>document.write(banner[random_banner]);</script>