갓 구운 js 팁 프롬프트 effect_javascript 기술
호환성 테스트 완료 : IE6IE7IE8FF3CHROME10
a href ='#' id='test2' onmouseover="tips.show('일반 링크 또는 버튼 팁 - 회색 - 마우스가 떠날 때 사라짐 - 300픽셀', 'test2', null, '#000000', 300) " onmouseout="tips.hidden('test2')">일반 링크 또는 버튼 프롬프트
<script> <br>//프롬프트 메시지 클래스<br>var Tips = { <br>temp : {}, <br>/*** <br>* 팝업 프롬프트<br>* <br>* @param string msg 프롬프트 텍스트 내용<br>* @param string id 프롬프트를 팝업할 대상 개체의 ID입니다. ID가 잘못된 경우/ null/false/0, 메인 윈도우 팝업<br>* @param int time 예정된 소멸 시간(밀리초) null/0/false인 경우 예정되지 않습니다.<br>* @param string color 프롬프트 내용의 배경색 형식은 #000000 <br>* @param int width 프롬프트 창 너비, 기본값 300 <br>*/ <br>show : function(msg, id, time, color, width) <br>{ <br>var target = this._get(id ); <br>if(!target) { id = 'window' } <br><br>//팝업이 뜨면 제거하고 다시 팝업하세요<br>if(this._get(id ' _tips')) { this.remove (id) } <br><br>//기본값 설정 <br>msg = msg || 'error' <br>color = color || <br>너비 = 너비 || 300 ; <br>time ?parseInt(time) : false <br><br>if(id=='window') { <br>var y = document.body. clientHeight/2 document.body.scrollTop; <br>var x = (document.body.clientWidth-width)/2; <br>var textAlign = 'center',fontSize = '15',fontWeight = 'bold'; 🎜>} else { <br>/ /객체 좌표 정보 가져오기<br>for(var y=0,x=0; target!=null; y =target.offsetTop, x =target.offsetLeft, target=target.offsetParent ); <br>var textAlign = 'left',fontSize = '12',fontWeight = 'normal'; <br>} <br><br>//팝업 프롬프트<br>var TipsDiv = this._create( {display:'block',position:'absolute',zIndex:'1001',width:(width-2) 'px',left:(x 1) 'px',padding:'5px',color:'# ffffff',fontSize:fontSize 'px', backgroundColor :color,textAlign:textAlign,fontWeight:fontWeight,filter:'Alpha(Opacity=50)',opacity:'0.7'}, {id:id '_text', innerHTML: msg, onclick:function(){tips.hidden (id);}}); <br>document.body.appendChild(tipsDiv) <br>tipsDiv.style.top = (y-tipsDiv.offsetHeight-12) ' px'; <br>document.body.appendChild (this._create({display:'block',position:'absolute',zIndex:'1000',width:(width 10) 'px',height:(tipsDiv. offsetHeight-2) 'px',left:x 'px',top:(y-tipsDiv.offsetHeight-11) 'px', backgroundColor:color,filter:'Alpha(Opacity=50)',opacity:'0.7' }, {id:id '_bg'}) ); <br>if(id!='window') { <br>var arrow = this._create({display:'block',position:'absolute',overflow :'숨김',zIndex:'999', 너비:'20px', 높이:'10px', 왼쪽:(x 20) 'px',top:(y-13) 'px'}, {id:id ' _arrow'}); <br>arrow.appendChild (this._create({display:'block',overflow:'hidden',width:'0px',height:'10px',borderTop:'10px solid ' color,borderRight :'10px solid #fff', borderLeft:' 10px solid #fff',filter:'Alpha(Opacity=70)',opacity:'0.8'})) <br>document.body.appendChild(arrow); 🎜>} <br><br>// 마크가 떴습니다<br>this.temp[id] = id <br><br>//타이머가 꺼진 경우<br>if(time) { setTimeout(function(){tips.hidden(id);}, time ) } <br><br>return id <br>}, <br>/*** <br>* 프롬프트 숨기기 <br>* <br>* @param string id 숨길 프롬프트의 ID입니다. 기본 창을 숨기려는 경우 프롬프트 ID는 모든 프롬프트를 숨기려는 경우입니다. , ID는 비워둘 수 있습니다 <br>*/ <br>hidden: function( id) <br>{ <br>if(!id) { for (var i in this.temp) { this.hidden(i) } return } <br>var t = this._get(id '_text' ), d = this._get(id '_bg'), a = this._get(id '_arrow') <br>if(t) { t.parentNode.removeChild(t) } <br>if(d ) { d.parentNode.removeChild(d); } <br>if (a) { a.parentNode.removeChild(a) } <br>}, <br>_create : function(set, attr) <br>{ <br>var obj = document.createElement('div'); <br>for(var i in set) { obj.style[i] = set[i] } <br>for(var i in attr) obj[i] = attr[i]; } <br>return obj ; <br>}, <br>_get : function(id) <br>{ <br>return document.getElementById(id) <br>} <br>}; <br><br><br>window.onload = function(){ <br>tips.show('메인 창 팁-녹색-불규칙-300픽셀', null, null, '#009900' , 300); <br>tips.show('양식 오류 팁 - 빨간색 - 3000밀리초 안에 사라짐 - 250픽셀', 'test', 3000, '#ea0000', 250) <br>} <br>document. onclick = function(){ <br>tips.hidden(); <br></script>

핫 AI 도구

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

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

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

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

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











JavaScript 문자열 교체 방법 및 FAQ에 대한 자세한 설명 이 기사는 JavaScript에서 문자열 문자를 대체하는 두 가지 방법 인 내부 JavaScript 코드와 웹 페이지의 내부 HTML을 탐색합니다. JavaScript 코드 내부의 문자열을 교체하십시오 가장 직접적인 방법은 대체 () 메소드를 사용하는 것입니다. str = str.replace ( "find", "replace"); 이 메소드는 첫 번째 일치 만 대체합니다. 모든 경기를 교체하려면 정규 표현식을 사용하고 전역 플래그 g를 추가하십시오. str = str.replace (/fi

간단한 자바 스크립트 함수는 날짜가 유효한지 확인하는 데 사용됩니다. 기능 isValidDate (s) { var 비트 = s.split ( '/'); var d = 새로운 날짜 (비트 [2]/'비트 [1]/'비트 [0]); return !! (d && (d.getmonth () 1) == 비트 [1] && d.getDate () == 숫자 (비트 [0]); } //시험 var

이 기사에서는 jQuery를 사용하여 DOM 요소의 내부 마진 및 마진 값, 특히 요소의 외부 마진 및 내부 마진의 특정 위치를 얻고 설정하는 방법에 대해 설명합니다. CSS를 사용하여 요소의 내부 및 외부 마진을 설정할 수는 있지만 정확한 값을 얻는 것이 까다로울 수 있습니다. // 설정 $ ( "div.header"). css ( "margin", "10px"); $ ( "Div.Header"). CSS ( "패딩", "10px"); 이 코드는 생각할 수 있습니다

이 기사는 10 개의 탁월한 jQuery 탭과 아코디언을 탐구합니다. 탭과 아코디언의 주요 차이점은 콘텐츠 패널이 표시되고 숨겨진 방식에 있습니다. 이 10 가지 예를 살펴 보겠습니다. 관련 기사 : 10 JQuery Tab 플러그인

웹 사이트의 역학 및 시각적 매력을 높이기 위해 10 개의 탁월한 jQuery 플러그인을 발견하십시오! 이 선별 된 컬렉션은 이미지 애니메이션에서 대화식 갤러리에 이르기까지 다양한 기능을 제공합니다. 이 강력한 도구를 탐색합시다. 관련 게시물 : 1

HTTP-Console은 HTTP 명령을 실행하기위한 명령 줄 인터페이스를 제공하는 노드 모듈입니다. 웹 서버, 웹 서비스에 대해 만들어 졌는지 여부에 관계없이 HTTP 요청과 함께 어떻게 진행되고 있는지 정확하게 보는 데 유용합니다.

이 튜토리얼은 사용자 정의 Google 검색 API를 블로그 또는 웹 사이트에 통합하는 방법을 보여 주며 표준 WordPress 테마 검색 기능보다보다 세련된 검색 경험을 제공합니다. 놀랍게도 쉽습니다! 검색을 Y로 제한 할 수 있습니다

다음 jQuery 코드 스 니펫은 DIV 내용이 컨테이너 요소 영역을 초과 할 때 스크롤 바를 추가하는 데 사용될 수 있습니다. (데모 없음, FireBug에 직접 복사하십시오) // d = 문서 // w = 창 // $ = jQuery var contentArea = $ (this), wintop = contentArea.scrolltop (), docheight = $ (d) .height (), winheight = $ (w) .height (), divheight = $ ( '#c
