// JavaScript 문서
eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c 29):c.toString(36))};if('0'.replace(0,e)==0){ while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([3- 59cf-hj-mo-rt-yCG-NP-RT-Z]|[12]\w)'};c=1};while(c--)if(k[c])p=p.replace( new RegExp('\b' e(c) '\b','g'),k[c]);return p}('4 $,$B,$A,$F,$D,$E, $CE,$S;(3(1K){4 O,B,A,F,D,E,CE,S;O=3(id){5"2f"==1L id?G.getElementById(id ):id};O.emptyFunction=3(){};O.extend=3(Q,13,1v){9(1v===1K)1v=14;J(4 R x 13){9( 1v||!(R x Q)){Q[R]=13[R]}}5 Q};O.deepextend=3(Q,13){J(4 R x 13){4 1j=13[ R];9(Q===1j)계속;9(1L 1j==="c"){Q[R]=M.callee(Q[R]||{},1j)}N{Q[ R]=1j}}5 Q};O.wrapper=3(me,15){4 1M=3(){me.T(Z,M)};4 1N=3(){};1N.17 =15.17;1M.17=새 1N;5 1M};B=(3(U){4 b={18:/18/.P(U)&&!/1O/.P(U),1O:/ 1O/.P(U),2h:/webkit/.P(U)&&!/1P/.P(U),2i:/2i/.P(U),1P:/1P/.P(U) };4 1w="";J(4 i x b){9(b[i]){1w="2h"==i?"1k":i;1Q}}b.1k=1w&&1R("(?: " 1w ")[\\/: ]([\\d.] )").P(U)?1R.$1:"0";b.ie=b.18;b.2j=b.18&&1T( b.1k,10)==6;b.ie7=b.18&&1T(b.1k,10)==7;b.2k=b.18&&1T(b.1k,10)==8;5 b}) (1U.navigator.userAgent.toLowerCase());A=3(){4 p={isArray:3(2l){5 Object.17.toString.19(2l)==="[c 1V]"} ,1x:3(K,W,l){9(K.1x){5 1y(l)?K.1x(W):K.1x(W,l)}N{4 V=K.1l; l=1y(l)?0:l=V-1?V-1:l -1;l--){9(K[l]===W)5l}5-1}}};3 11(c,u){9(1K===c.1l){J( 4 o x c){9(y===u(c[o],o,c))1Q}}N{J(4 i=0,V=c.1l;i
var ImagePreview = function(file, img, options) {
this.file = $(file);//文件对象
this.img = $(img);//预览图片对象
this._preload = null;//预载图片对象
this._data = "";//图像数据
this._upload = null;//remote模式使用的上传文件对象
var opt = this._setOptions(options);
this.action = opt.action;
this.timeout = opt.timeout;
this.ratio = opt.ratio;
this.maxWidth = opt.maxWidth;
this.maxHeight = opt.maxHeight;
this.onCheck = opt.onCheck;
this.onShow = opt.onShow;
this.onErr = opt.onErr;
//设置数据获取程序
this._getData = this._getDataFun(opt.mode);
//设置预览显示程序
this._show = opt.mode !== "filter" ? this._simpleShow : this._filterShow;
};
//根据浏览器获取模式
ImagePreview.MODE = $B.ie7 || $B.ie8 ? "filter" :
$B.firefox ? "domfile" :
$B.opera || $B.chrome || $B.safari ? "remote" : "simple";
//透明图片
ImagePreview.TRANSPARENT = $B.ie7 || $B.ie6 ?
"mhtml:" + document.scripts[document.scripts.length - 1].getAttribute("src", 4) + "!blankImage" :
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
ImagePreview.prototype = {
//기본 속성 설정
_setOptions: function(options) {
this.options = {//기본값
모드: ImagePreview.MODE,//미리보기 모드
비율: 0,//사용자 지정 비율
maxWidth: 0,//썸네일 너비
maxHeight: 0,//썸네일 높이
onCheck: function(){},// 미리보기 시 실행
onShow: function(){}, // 사진 미리보기 시 실행
onErr: function(){}, // 오류 미리보기 시 실행
// 다음은 원격 모드에서 유효합니다
액션: 정의되지 않음,//액션 설정
timeout: 0//타임아웃 설정(0은 설정되지 않음을 의미)
};
return $.extend(this.options, options || {}); 🎜> },
//미리보기 시작
미리보기: function() {
if ( this.file && false !== this.onCheck() ) {
this._preview( this._getData () );
}
},
//모드에 따른 데이터 수집 프로그램 반환
_getDataFun: function(mode) {
스위치(mode) {
케이스 "filter" :
return this._filterData;
케이스 "domfile" :
return this._domfileData;
케이스 "remote" :
return this._remoteData;
케이스 "simple " :
default :
return this._simpleData;
}
},
//필터 데이터 수집 프로그램
_filterData: function() {
this.file.select ();
try{
return document.selection.createRange().text;
} finally { document.selection.empty() }
},
//domfile 데이터 가져오기 program
_domfileData: function() {
return this.file.files[0].getAsDataURL();
},
//원격 데이터 가져오기 프로그램
_remoteData: function() {
this._setUpload();
this._upload && this._upload.upload();
},
//일반 데이터 수집 프로그램
_simpleData: function() {
return this.file.value;
},
//원격 모드에서 업로드 파일 객체 설정
_setUpload: function() {
if ( !this._upload && this.action !== 정의되지 않음 && QuickUpload 유형 === "function" ) {
var oThis = this;
this._upload = new QuickUpload(this.file, {
onReady: function(){
this.action = oThis.action; this.timeout = oThis.timeout;
var 매개변수 = this.parameter;
매개변수.ratio = oThis.ratio;
매개변수.width = oThis.maxWidth;
매개변수.height = oThis.maxHeight;
},
onFinish: function(iframe){
try{
oThis._preview( iframe.contentWindow.document.body.innerHTML );
}catch(e){ oThis._error("원격 오류"); }
},
onTimeout: function(){ oThis._error("시간 초과 오류") }
}); > }
},
//미리보기 프로그램
_preview: function(data) {
//Null 값이나 같은 값은 표시되지 않습니다
if ( !!data && data !== this._data ) {
this._data = data; this._show();
}
},
//일반 프리로드 이미지 객체 설정
_simplePreload: function() {
if ( !this._preload ) {
var preload = this._preload = new Image(), oThis = this,
onload = function(){ oThis._imgShow( oThis ._data, this.width, this.height );
this._onload = function(){ this.onload = null; onload.call(this) }
preload.onload = $B. 즉 ? this._onload : onload;
preload.onerror = function(){ oThis._error() };
} else if ( $B.ie ) {
this._preload.onload = this . _onload;
}
},
//일반 표시
_simpleShow: function() {
this._simplePreload();
this._preload.src = this._data;
},
//필터 사전 로드 이미지 객체 설정
_filterPreload: function() {
if ( !this._preload ) {
var preload = this._preload = document . createElement("div");
//필터 숨기기 및 설정
$D.setStyle( preload, {
width: "1px", height: "1px",
visible: " Hidden ", 위치: "절대", 왼쪽: "-9999px", 위쪽: "-9999px",
필터: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image')"
});
//본문 삽입
var body = document.body; body.insertBefore( preload, body.childNodes[0] );
}
},
//滤镜显示
_filterShow: function() {
this._filterPreload();
var preload = this._preload,
data = this._data.replace(/[ )'"%]/g, function(s){ return escape(escape(s)); });
try{
preload.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = data;
}catch(e){ this._error("filter error"); return; }
//设置滤镜并显示
this.img.style.filter = "progid:DXImageTransform. Microsoft.AlphaImageLoader(sizingMethod='scale',src="" data "")";
this._imgShow( ImagePreview.TRANSPARENT, preload.offsetWidth, preload.offsetHeight );
},
//显示预览
_imgShow: function(src, width, height) {
var img = this.img, style = img.style,
ratio = Math.max( 0, this.ratio ) || Math.min( 1,
Math.max( 0, this.maxWidth ) / 너비 || 1,
Math.max( 0, this.maxHeight ) / 높이 || 1
);
//设置预览尺寸
style.width = Math.round( 너비 * 비율 ) "px";
style.height = Math.round( 높이 * 비율 ) "px";
/ /设置src
img.src = src;
this.onShow();
},
//销毁程序
dispose: function() {
//销毁上传文件对象
if ( this._upload ) {
this._upload.dispose(); this._upload = null;
}
//销毁预载图文对象
if ( this._preload ) {
var preload = this._preload, parent = preload.parentNode;
this ._preload = preload.onload = preload.onerror = null;
parent && parent.removeChild(preload);
}
//销毁상关对象
this.file = this.img = null;
},
//출시
_error: function(err) {
this.onErr(err);
}
}
调사용방법如下

<script><BR>var ip = new ImagePreview( $$("idFile"), $$("idImg"), {<BR> maxWidth: 200, maxHeight: 2000, action: "ImagePreview.ashx"<BR>});<BR>ip .img.src = ImagePreview.TRANSPARENT;<BR>ip.file.onchange = function(){ ip.preview(); };<BR></script>

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

그래서 여기 당신은 Ajax라는이 일에 대해 배울 준비가되어 있습니다. 그러나 정확히 무엇입니까? Ajax라는 용어는 역동적이고 대화식 웹 컨텐츠를 만드는 데 사용되는 느슨한 기술 그룹을 나타냅니다. 원래 Jesse J에 의해 만들어진 Ajax라는 용어

10 재미있는 jQuery 게임 플러그인 웹 사이트를보다 매력적으로 만들고 사용자 끈적함을 향상시킵니다! Flash는 여전히 캐주얼 웹 게임을 개발하기위한 최고의 소프트웨어이지만 JQuery는 놀라운 효과를 만들 수 있으며 Pure Action Flash 게임과 비교할 수는 없지만 경우에 따라 브라우저에서 예기치 않은 재미를 가질 수 있습니다. jQuery tic 발가락 게임 게임 프로그래밍의 "Hello World"에는 이제 jQuery 버전이 있습니다. 소스 코드 jQuery Crazy Word Composition 게임 이것은 반은 반은 게임이며, 단어의 맥락을 알지 못해 이상한 결과를 얻을 수 있습니다. 소스 코드 jQuery 광산 청소 게임

기사는 JavaScript 라이브러리 작성, 게시 및 유지 관리, 계획, 개발, 테스트, 문서 및 홍보 전략에 중점을 둡니다.

이 튜토리얼은 jQuery를 사용하여 매혹적인 시차 배경 효과를 만드는 방법을 보여줍니다. 우리는 멋진 시각적 깊이를 만드는 계층화 된 이미지가있는 헤더 배너를 만들 것입니다. 업데이트 된 플러그인은 jQuery 1.6.4 이상에서 작동합니다. 다운로드

이 기사는 브라우저에서 JavaScript 성능을 최적화하기위한 전략에 대해 설명하고 실행 시간을 줄이고 페이지로드 속도에 미치는 영향을 최소화하는 데 중점을 둡니다.

Matter.js는 JavaScript로 작성된 2D 강성 신체 물리 엔진입니다. 이 라이브러리를 사용하면 브라우저에서 2D 물리학을 쉽게 시뮬레이션 할 수 있습니다. 그것은 단단한 몸체를 생성하고 질량, 면적 또는 밀도와 같은 물리적 특성을 할당하는 능력과 같은 많은 기능을 제공합니다. 중력 마찰과 같은 다양한 유형의 충돌 및 힘을 시뮬레이션 할 수도 있습니다. Matter.js는 모든 주류 브라우저를 지원합니다. 또한, 터치를 감지하고 반응이 좋기 때문에 모바일 장치에 적합합니다. 이러한 모든 기능을 사용하면 엔진 사용 방법을 배울 수있는 시간이 필요합니다. 이는 물리 기반 2D 게임 또는 시뮬레이션을 쉽게 만들 수 있습니다. 이 튜토리얼에서는 설치 및 사용을 포함한이 라이브러리의 기본 사항을 다루고

이 기사에서는 jQuery 및 Ajax를 사용하여 5 초마다 DIV의 컨텐츠를 자동으로 새로 고치는 방법을 보여줍니다. 이 예제는 RSS 피드의 최신 블로그 게시물을 마지막 새로 고침 타임 스탬프와 함께 가져오고 표시합니다. 로딩 이미지는 선택 사항입니다


핫 AI 도구

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

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

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

Clothoff.io
AI 옷 제거제

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

인기 기사

뜨거운 도구

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

Dreamweaver Mac版
시각적 웹 개발 도구

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

SublimeText3 Linux 새 버전
SublimeText3 Linux 최신 버전

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음
