검색결과 리스트
이미지 랜덤 자바스크립트에 해당되는 글 1건
- 2011.11.30 이미지 랜덤 프리젠트와 링크
글
브라우저를 새로고침하거나 새로 읽었을때, 다른 이미지를 볼 수 있습니다. (랍니다!)
<script type="text/javascript">
//Javascript Created by Computerhope http://www.computerhope.com
//store the quotations in arrays
var images = [],
index = 0;
images[0] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner.gif' alt='Visit Computer Hope'></a>";
images[1] = "<a href = 'http://www.computerhope.com/history/index.htm'><img src='http://www.computerhope.com/banners/banner2.gif' alt='Computer History'></a>";
images[2] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner3.gif' alt='Visit Computer Hope'></a>";
images[3] = "<a href = 'http://www.computerhope.com/newslet.htm'><img src='http://www.computerhope.com/banners/banner4.gif' alt='Computer Hope Newsletter'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
</script>
//Javascript Created by Computerhope http://www.computerhope.com
//store the quotations in arrays
var images = [],
index = 0;
images[0] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner.gif' alt='Visit Computer Hope'></a>";
images[1] = "<a href = 'http://www.computerhope.com/history/index.htm'><img src='http://www.computerhope.com/banners/banner2.gif' alt='Computer History'></a>";
images[2] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner3.gif' alt='Visit Computer Hope'></a>";
images[3] = "<a href = 'http://www.computerhope.com/newslet.htm'><img src='http://www.computerhope.com/banners/banner4.gif' alt='Computer Hope Newsletter'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
</script>
출처 : http://www.computerhope.com/j18.htm
'js' 카테고리의 다른 글
모바일 웹사이트를 위한 뒤로가기(back) 버튼 (0) | 2012.07.16 |
---|
RECENT COMMENT