찾다
웹 프론트엔드JS 튜토리얼js Sina의 이미지 재생 이미지 회전 효과 code_image 특수 효과


핵심 코드
코드 복사 코드는 다음과 같습니다

기능 슬라이드(src,link,text,target,attr,desc) {
  this.desc = desc
  this.src = src;
  this.link = 링크;
  this.text = 텍스트;
  this.target = target;
  this.attr = attr;
  if (document.images) {
    this.image = 새 이미지();
  }
  this.loaded = false;
  this.load = function() {
    if (!document.images) { return; }

    if (!this.loaded) {
      this.image.src = this.src;
      this.loaded = true;
    }
  }
  this.hotlink = function() {
    var mywindow;
    if (!this.link) 반환;
    if (this.target) {
      if (this.attr) {
        mywindow = window.open(this.link, this.target, this.attr);

      } else {
        mywindow = window.open(this.link, this.target);
      }
      if (mywindow && mywindow.focus) mywindow.focus();

    } else {
      location.href = this.link;
    }
  }
}
기능 슬라이드쇼( 슬라이드쇼 이름 ) {
  this.name = 슬라이드쇼 이름;
  this.repeat = true;
  this.prefetch = -1;
  this.image;
  this.textid;
  this.textarea;
  this.timeout = 5000;
  this.slides = 새 배열();
  this.current = 0;
  this.timeoutid = 0;
  this.add_slide = 함수(슬라이드) {
    var i = this.slides.length;
    if (this.prefetch == -1) {
      slide.load();
    }

    this.slides[i] = 슬라이드;
  }
  this.play = function(timeout) {
    this.pause();
    if (시간 초과) {
      this.timeout = 시간 초과;
    }
    if (typeof this.slides[ this.current ].timeout != '정의되지 않음') {
      시간 초과 = this.slides[ this.current ].timeout;
    } else {
      시간 초과 = this.timeout;
    }
    this.timeoutid = setTimeout( this.name   ".loop()", timeout);
  }
  this.pause = function() {
    if (this.timeoutid != 0) {

      clearTimeout(this.timeoutid);
      this.timeoutid = 0;

    }
  }
  this.update = function() {
    if (! this.valid_image()) { return; }
    if (typeof this.pre_update_hook == 'function') {
      this.pre_update_hook();
    }
    var slide = this.slides[ this.current ];
    var dofilter = false;
    if (this.image &&
        typeof this.image.filters != '정의되지 않음' &&
        typeof this.image.filters[0] != '정의되지 않음') {
      dofilter = true;

    }
    slide.load();
    if (dofilter) {
      if (slide.filter &&
         this.image.style &&
         this.image.style.filter) {
        this.image.style.filter = 슬라이드 .필터;
      }
      this.image.filters[0].Apply();
    }
    this.image.src = slide.image.src;
    if (dofilter) {
      this.image.filters[0].Play();
    }
    this.display_text();
    if (typeof this.post_update_hook == 'function') {
      this.post_update_hook();
    }
    if (this.prefetch > 0) {

      var next, prev, count;
      다음 = this.current;
      prev = this.current;
      개수 = 0;
      do {
        if ( next >= this.slides.length) next = 0;
        if (--prev         this.slides[next].load();
        this.slides[이전].load();
      } while ( count     }
  }
  this.goto_slide = function(n) {
    if (n == -1) {
      n = this.slides.length - 1;
    }
    if (n = 0) {
      this.current = n;
    }
    this.update();
  }
  this.goto_random_slide = function(include_current) {
    var i;
    if (this.slides.length > 1) {
      do {
        i = Math.floor(Math.random()*this.slides.length);
      } 동안(i == this.current);
      this.goto_slide(i);
    }
  }
  this.next = function() {
    if (this.current       this.current ;
    } else if (this.repeat) {
      this.current = 0;
    }
    this.update();
  }
  this.previous = function() {
    if (this.current > 0) {
      this.current--;
    } else if (this.repeat) {
      this.current = this.slides.length - 1;
    }
    this.update();
  }
  this.shuffle = function() {
    var i, i2, slides_copy, slides_randomized;
    slides_copy = 새 배열();
    for (i = 0; i       slides_copy[i] = this.slides[i];
    }
    slides_randomized = 새 배열();
    do {
      i = Math.floor(Math.random()*slides_copy.length);
      slides_randomized[ slides_randomized.length ] =
        slides_copy[i];
      for (i2 = i   1; i2         slides_copy[i2 - 1] = slides_copy[i2];
      }
      slides_copy.length--;
    } 동안(slides_copy.length);
    this.slides = 슬라이드_무작위화;
  }
  this.get_text = function() {
    return(this.slides[ this.current ].text);
  }
  this.get_all_text = function(before_slide, after_slide) {
    all_text = "";
    for (i=0; i       슬라이드 = this.slides[i];
      if (slide.text) {
        all_text  = before_slide   slide.text   after_slide;
      }
    }
    return(all_text);
  }
  this.display_text = function(text) {
    if (!text) {
      text = this.slides[ this.current ].text;
    }
    if (this.textarea && typeof this.textarea.value != '정의되지 않음') {
      this.textarea.value = text;
    }
    if (this.textid) {
      r = this.getElementById(this.textid);
      if (!r) { return false; }
      if (typeof r.innerHTML == '정의되지 않음') { return false; }
      r.innerHTML = 텍스트;
    }
  }
  this.hotlink = function() {
    this.slides[ this.current ].hotlink();
  }
  this.save_position = function(cookiename) {
    if (!cookiename) {
      cookiename = this.name   '_slideshow';
    }
    document.cookie = 쿠키 이름   '='   this.current;
  }
  this.restore_position = function(cookiename) {
    if (!cookiename) {
      cookiename = this.name   '_slideshow';
    }
    var 검색 = 쿠키 이름   "=";
    if (document.cookie.length > 0) {
      offset = document.cookie.indexOf(search);
      if (오프셋 != -1) { 
        오프셋  = search.length;
        end = document.cookie.indexOf(";", offset);
        if (end == -1) end = document.cookie.length;
        this.current = parseInt(unescape(document.cookie.substring(offset, end)));
        }
     }
  }
  this.noscript = function() {
    $html = "n";
    for (i=0; i       슬라이드 = this.slides[i];
      $html  = '

';
      if (slide.link) {
        $html  = '';
      }
      $html  = 'js Sina의 이미지 재생 이미지 회전 효과 code_image 특수 효과';
      if (slide.link) {
        $html  = "
";
      }
      if (slide.text) {
        $html  = "
n"   slide.text;
      }
      $html  = "

"   "nn";
    }
    $html = $html.replace(/&/g, "&" );
    $html = $html.replace(/, "    $html = $html.replace(/>/g, ">" );
    return('
'   $html   '
');
  }
  this.loop = function() {
    if (this.current       next_slide = this.slides[this.current   1];
      if (next_slide.image.complete == null || next_slide.image.complete) {
        this.next();
      }
    } else {
      this.next();
    }
    this.play( );
  }
  this.valid_image = function() {
    if (!this.image){
      return false;
    }
    else {
      return true;
    }
  }
  this.getElementById = function(element_id) {
    if (document.getElementById) {
      return document.getElementById(element_id);
    }
    else if (document.all) {
      return document.all[element_id];
    }
    else if (document.layers) {
      return document.layers[element_id];
    } else {
      반환 미정의;
    }
  }
  this.set_image = function(imageobject) {
    if (!document.images)
      return;
    this.image = imageobject;
  }
  this.set_textarea = function(textareaobject) {
    this.textarea = textareaobject;
    this.display_text();
  }
  this.set_textid = function(textidstr) {
    this.textid = textidstr;
    this.display_text();
  }
}

새로운浪图文播放器在线演示
새로운浪图文播放器打包下载
성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
브라우저 너머 : 실제 세계의 JavaScript브라우저 너머 : 실제 세계의 JavaScriptApr 12, 2025 am 12:06 AM

실제 세계에서 JavaScript의 응용 프로그램에는 서버 측 프로그래밍, 모바일 애플리케이션 개발 및 사물 인터넷 제어가 포함됩니다. 1. 서버 측 프로그래밍은 Node.js를 통해 실현되며 동시 요청 처리에 적합합니다. 2. 모바일 애플리케이션 개발은 재교육을 통해 수행되며 크로스 플랫폼 배포를 지원합니다. 3. Johnny-Five 라이브러리를 통한 IoT 장치 제어에 사용되며 하드웨어 상호 작용에 적합합니다.

Next.js (백엔드 통합)로 멀티 테넌트 SAAS 애플리케이션 구축Next.js (백엔드 통합)로 멀티 테넌트 SAAS 애플리케이션 구축Apr 11, 2025 am 08:23 AM

일상적인 기술 도구를 사용하여 기능적 다중 테넌트 SaaS 응용 프로그램 (Edtech 앱)을 구축했으며 동일한 작업을 수행 할 수 있습니다. 먼저, 다중 테넌트 SaaS 응용 프로그램은 무엇입니까? 멀티 테넌트 SAAS 응용 프로그램은 노래에서 여러 고객에게 서비스를 제공 할 수 있습니다.

Next.js (Frontend Integration)를 사용하여 멀티 테넌트 SaaS 응용 프로그램을 구축하는 방법Next.js (Frontend Integration)를 사용하여 멀티 테넌트 SaaS 응용 프로그램을 구축하는 방법Apr 11, 2025 am 08:22 AM

이 기사에서는 Contrim에 의해 확보 된 백엔드와의 프론트 엔드 통합을 보여 주며 Next.js를 사용하여 기능적인 Edtech SaaS 응용 프로그램을 구축합니다. Frontend는 UI 가시성을 제어하기 위해 사용자 권한을 가져오고 API가 역할 기반을 준수하도록합니다.

JavaScript : 웹 언어의 다양성 탐색JavaScript : 웹 언어의 다양성 탐색Apr 11, 2025 am 12:01 AM

JavaScript는 현대 웹 개발의 핵심 언어이며 다양성과 유연성에 널리 사용됩니다. 1) 프론트 엔드 개발 : DOM 운영 및 최신 프레임 워크 (예 : React, Vue.js, Angular)를 통해 동적 웹 페이지 및 단일 페이지 응용 프로그램을 구축합니다. 2) 서버 측 개발 : Node.js는 비 차단 I/O 모델을 사용하여 높은 동시성 및 실시간 응용 프로그램을 처리합니다. 3) 모바일 및 데스크탑 애플리케이션 개발 : 크로스 플랫폼 개발은 개발 효율을 향상시키기 위해 반응 및 전자를 통해 실현됩니다.

JavaScript의 진화 : 현재 동향과 미래 전망JavaScript의 진화 : 현재 동향과 미래 전망Apr 10, 2025 am 09:33 AM

JavaScript의 최신 트렌드에는 Typescript의 Rise, 현대 프레임 워크 및 라이브러리의 인기 및 WebAssembly의 적용이 포함됩니다. 향후 전망은보다 강력한 유형 시스템, 서버 측 JavaScript 개발, 인공 지능 및 기계 학습의 확장, IoT 및 Edge 컴퓨팅의 잠재력을 포함합니다.

Demystifying JavaScript : 그것이하는 일과 중요한 이유Demystifying JavaScript : 그것이하는 일과 중요한 이유Apr 09, 2025 am 12:07 AM

JavaScript는 현대 웹 개발의 초석이며 주요 기능에는 이벤트 중심 프로그래밍, 동적 컨텐츠 생성 및 비동기 프로그래밍이 포함됩니다. 1) 이벤트 중심 프로그래밍을 사용하면 사용자 작업에 따라 웹 페이지가 동적으로 변경 될 수 있습니다. 2) 동적 컨텐츠 생성을 사용하면 조건에 따라 페이지 컨텐츠를 조정할 수 있습니다. 3) 비동기 프로그래밍은 사용자 인터페이스가 차단되지 않도록합니다. JavaScript는 웹 상호 작용, 단일 페이지 응용 프로그램 및 서버 측 개발에 널리 사용되며 사용자 경험 및 크로스 플랫폼 개발의 유연성을 크게 향상시킵니다.

Python 또는 JavaScript가 더 좋습니까?Python 또는 JavaScript가 더 좋습니까?Apr 06, 2025 am 12:14 AM

Python은 데이터 과학 및 기계 학습에 더 적합한 반면 JavaScript는 프론트 엔드 및 풀 스택 개발에 더 적합합니다. 1. Python은 간결한 구문 및 풍부한 라이브러리 생태계로 유명하며 데이터 분석 및 웹 개발에 적합합니다. 2. JavaScript는 프론트 엔드 개발의 핵심입니다. Node.js는 서버 측 프로그래밍을 지원하며 풀 스택 개발에 적합합니다.

JavaScript를 어떻게 설치합니까?JavaScript를 어떻게 설치합니까?Apr 05, 2025 am 12:16 AM

JavaScript는 이미 최신 브라우저에 내장되어 있기 때문에 설치가 필요하지 않습니다. 시작하려면 텍스트 편집기와 브라우저 만 있으면됩니다. 1) 브라우저 환경에서 태그를 통해 HTML 파일을 포함하여 실행하십시오. 2) Node.js 환경에서 Node.js를 다운로드하고 설치 한 후 명령 줄을 통해 JavaScript 파일을 실행하십시오.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
3 몇 주 전By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
3 몇 주 전By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
3 몇 주 전By尊渡假赌尊渡假赌尊渡假赌
WWE 2K25 : Myrise에서 모든 것을 잠금 해제하는 방법
3 몇 주 전By尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

ZendStudio 13.5.1 맥

ZendStudio 13.5.1 맥

강력한 PHP 통합 개발 환경

Atom Editor Mac 버전 다운로드

Atom Editor Mac 버전 다운로드

가장 인기 있는 오픈 소스 편집기

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

MinGW - Windows용 미니멀리스트 GNU

MinGW - Windows용 미니멀리스트 GNU

이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

맨티스BT

맨티스BT

Mantis는 제품 결함 추적을 돕기 위해 설계된 배포하기 쉬운 웹 기반 결함 추적 도구입니다. PHP, MySQL 및 웹 서버가 필요합니다. 데모 및 호스팅 서비스를 확인해 보세요.