Prindol

DESIGN, HTML5, CSS3, DOM, Jquery, JSON, Actionscript2/3, Linux, IIS

You are not logged in.

#1 2016-09-12 18:21:47

skydown
Administrator
Registered: 2011-07-25
Posts: 315

[JAVASCRIPT] 익스버전체크, 플래시버전체크

function ieCheck() {//익스버전체크
	var msg = null;
	function version() {
		msg = "You're not using Internet Explorer.";
		var ver = check();
		if (ver > -1) msg = 'ie' + ver;//IE 체크
		if (navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) msg = 'edge';//edge 체크
		return msg;
	}
	function check() {
		var rv = -1;
		if (navigator.appName == 'Microsoft Internet Explorer') {
			var ua = navigator.userAgent;
			var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
			if (re.exec(ua) != null)
				rv = parseFloat(RegExp.$1);
		}
		return rv;
	}
	return version();
};//익스버전체크
function flashCheck() {//플래시버전체크
	try{
		try{
			var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
			try{axo.AllowScriptAccess = 'always'; }
			catch(e) { return '6,0,0'; }
		}
		catch(e) {}
		return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];

	}catch(e){
		try{ 
			if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ 
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
			} 
		}catch(e) {}
	}
	return '0,0,0';
}//플래시버전체크

Offline

Board footer

Powered by FluxBB