\r\n \r\n \r\n대략 벡그라운드 소스를 불러들이는 스크립 같은데 어떻게 활용할 수 있는지요?","url":"https://sir.kr/boards/free/59101","author":{"@type":"Person","name":"bbking"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"datePublished":"2005-08-25T20:52:45+09:00","dateModified":"2005-08-25T20:52:45+09:00","comment":[{"@type":"Comment","text":"랜덤번호 1 에서 10까지를 찾아 백그라운드 이미지를 불러드리는 소스네요.\r\n먼저 fever1.jpg 에서 fever10.jpg 까지의 백그라운드 이미지를 만들어 image 에 저장하고\r\n그냥 head.php에 소스를 넣어 쓰면 되겠네요.","author":{"@type":"Person","name":"텍와이드"},"datePublished":"2005-08-25T21:08:02+09:00"},{"@type":"Comment","text":"그렇군요....감사합니다....^^\r\nbackground:url(image/fever\" + spcbg + \".jpg) 이부분에 있었군요....^^","author":{"@type":"Person","name":"bbking"},"datePublished":"2005-08-25T23:05:40+09:00"},{"@type":"Comment","text":"bbking 님!\r\n랜덤.....\r\n연구 많이 하시네요.","author":{"@type":"Person","name":"바다"},"datePublished":"2005-08-25T22:41:45+09:00"},{"@type":"Comment","text":"^^ 습관성 스크립트 기피증이라서요....ㅎㅎ","author":{"@type":"Person","name":"bbking"},"datePublished":"2005-08-25T23:06:26+09:00"}]}
b

이것좀 해석해주세요...!

bbking
· 20년 전 · 1200 · 4
<script language="JavaScript">
<!--
var spcbg
do spcbg = Math.floor(Math.random()*100);
while (spcbg > 10 || spcbg < 1);
document.writeln("<style><!--");
document.writeln("body {background:url(image/fever" + spcbg + ".jpg) }");
document.writeln("--></style>");
//-->
</script>
 
 
대략 벡그라운드 소스를 불러들이는 스크립 같은데 어떻게 활용할 수 있는지요?
|

댓글 4개

랜덤번호 1 에서 10까지를 찾아 백그라운드 이미지를 불러드리는 소스네요.
먼저 fever1.jpg 에서 fever10.jpg 까지의 백그라운드 이미지를 만들어 image 에 저장하고
그냥 head.php에 소스를 넣어 쓰면 되겠네요.
bbbking
20년 전
그렇군요....감사합니다....^^
background:url(image/fever" + spcbg + ".jpg) 이부분에 있었군요....^^
bbking 님!
랜덤.....
연구 많이 하시네요.
bbbking
20년 전
^^ 습관성 스크립트 기피증이라서요....ㅎㅎ
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
20년 전 조회 1,245
20년 전 조회 1,528
20년 전 조회 1,521
bbbking
20년 전 조회 1,342
20년 전 조회 1,177
20년 전 조회 1,433
아꽈
20년 전 조회 1,266
아꽈
20년 전 조회 1,226
20년 전 조회 4,010
아꽈
20년 전 조회 1,163
20년 전 조회 1,200
20년 전 조회 1,888
20년 전 조회 1,273
20년 전 조회 1,262
bbbking
20년 전 조회 1,201
20년 전 조회 1,759
20년 전 조회 1,252
20년 전 조회 1,261
20년 전 조회 1,228
20년 전 조회 1,363
20년 전 조회 1,273
20년 전 조회 1,187
20년 전 조회 1,394
아꽈
20년 전 조회 1,238
20년 전 조회 1,432
20년 전 조회 1,210
20년 전 조회 1,262
20년 전 조회 1,262
20년 전 조회 1,916
20년 전 조회 1,881