$(document).ready(function() {
var count = 0;
var images = [
"http://79.115.69.135:8521/UnderConstruction/Images/deestiny.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/dishonored.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/fallout4.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/fc3.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/halo5.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/me-som.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/rise.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/road4.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/southpark.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/subzero.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/tesv.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/thief.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/watchdogs.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/me-sow.jpg",
"http://79.115.69.135:8521/UnderConstruction/Images/wot.jpg",
];
var image = $(".background");
image.css("background-image", "url(" + (images[count] + ")"))
setInterval(function() {
image.fadeOut(1500, function() {
image.css("background-image", "url(" + images[count++] + ")");
image.fadeIn(1500);
});
if (count == images.length) {
count = 0;
}
},10000); });
, 나는 http://ip.com/folder/folder/img.img에 새로운 라인을 작성해야 이미지 트릭 ... 은 1.How 내가 그것을 할 수 있습니다 자바 스크립트 임의의 이미지를 선택하십시오! 2. ip.com으로 단 한 줄만 만드는 방법 ... 이미지를 추가하고 싶을 때 새로운 줄을 만들지 않았습니다! 난수를 들어내가이 자바 스크립트 코드 .... 나는 새로운 이미지를 추가 할 때마다이
1. 구글 자바 스크립트 임의의 숫자를 시도 했습니까? – SLaks
2. 문자열 연결의 경이로움을 찾고 계십니다. – SLaks
네,하지만 파일/이미지에서 어떻게 사용하는지 모르겠습니다. –