'javascript'에 해당되는 글 55건
- 2011/07/19 Javascript - document.execCommand Method
- 2011/03/15 Javascript - Ajax module on OWA(MS Outlook Web Apps.)
- 2011/03/08 for Javascript
- 2011/03/05 Javascript - Selection text of web page
- 2011/03/02 Persisting Collapsible TOC State
- 2010/04/10 JSINQ - LINQ With JavaScript
- 2010/02/18 Javascript - Element Opacity Control for Cross Browser
- 2009/09/23 Ext JS 3.0
- 2009/09/16 For Beginner XML DOM & Javascript Guide
- 2009/07/20 Javascript : Microsoft OS & Internet Explorer Agent Check
Javascript 의 execCommand 명령어로 할 수 있는 외부 기능이 많습니다.
물론 앞으로는 없어질 추세에 있고, 브라우저 호환성에 좋지 않지만,
아직까지는, 그리고 한국에서는 활용도가 있는 편이기 때문에 혹시나하는 일에 사용될 수도 있겠죠.
이 스크립트 메소드를 이용해서 쓸 수 있는 명령들이 잘 정리되어 있는 페이지가 있어 연결합니다.
참고 주소 : http://koxo.com/lang/js/method/commandIdentifiers.html
http://msdn.microsoft.com/en-us/library/ms536419(VS.85).aspx
| 2D-Position | 절대적으로 위치된 엘레멘트를 드래그로 이동이킬 수 있도록 한다. |
| AbsolutePosition | 엘레멘트의 position 속성을 절대적(absolute)으로 설정한다. |
| BackColor | 현재 선택의 배경색을 반환하거나 설정한다. |
| Bold | 현재 선택의 글자를 굵은(bold) 글자와 보통 글자로 변경(toggle)시킨다. |
| ClearAuthenticationCache | 캐쉬(cache)로부터 승인된 인승서들은 제거한다. execCommand에만 적용된다. |
| Copy | 현재 선택을 클립보드로 복사한다. |
| CreateBookmark | 북마크(bookmark) anchor를 생성하거나 현재 선택이나 삽입점애 대한 북마크 앤커의 이름을 반환한다. |
| CreateLink | 현재 선택에 연결(hyperlink)을 삽입하거나, 사용자가 주소(URL)를 삽입할 수 있도록 대화창을 디스플레이한다. |
| Cut | 현재 선택을 잘라내기하여 클립보드로 복사한다(잘라내기). |
| Delete | 현재 선택을 삭제한다. |
| FontName | 현재 선택을 위한 글꼴 이름을 반환하거나 설정한다. |
| FontSize | 현재 선택을 위한 글꼴 크기을 반환하거나 설정한다. |
| ForeColor | 현재 선택을 위한 글자 색상을 반환하거나 설정한다. |
| FormatBlock | 현재 블럭 양식화 태그를 설정한다. |
| Indent | 현재 선택을 들여쓰기 한단계만큼 들여쓰기 한다. |
| InsertButton | 현재 선택된 택스트에 단추제어를 덮어쓰기한다. |
| InsertFieldset | 현재 선택에 박스를 덮어쓰기한다. |
| InsertHorizontalRule | 현재 선택에 수평줄를 덮어쓰기한다. |
| InsertIFrame | 현재 선택에 인라인 프레임(IFRAME)을 덮어쓰기한다. |
| InsertImage | 현재 선택에 이미지를 덮어쓰기한다. |
| InsertInputButton | 현재 선택에 입력 단추 제어를 덮어쓰기한다. |
| InsertInputCheckbox | 현재 선택에 입력 체크박스 제어를 덮어쓰기한다. |
| InsertInputFileUpload | 현재 선택에 입력 파일 업로드 제어를 덮어쓰기한다. |
| InsertInputHidden | 현재 선택에 감풔진 입력 제어를 덮어쓰기한다. |
| InsertInputImage | 현재 선택에 이미지 입력 제어를 덮어쓰기한다. |
| InsertInputPassword | 현재 선택에 암호 입력 제어를 덮어쓰기한다. |
| InsertInputRadio | 현재 선택에 레디오 입력 단추 제어를 덮어쓰기한다. |
| InsertInputReset | 현재 선택에 재설정 입력 제어를 덮어쓰기한다. |
| InsertInputSubmit | 현재 선택에 송신 입력 제어를 덮어쓰기한다. |
| InsertInputText | 현재 선택에 텍스트 입력 제어를 덮어쓰기한다. |
| InsertMarquee | 현재 선택에 빈 마퀴(MARQUEE)를 덮어쓰기한다. |
| InsertOrderedList | 현재 선택에 번호있는 목록(OL)과 보통 블럭양식으로 변경(toggle)시킨다. |
| InsertParagraph | 현재 선택에 줄바꿈을 덮어쓰기한다. |
| InsertSelectDropdown | 현재 선택의 드롭다운 선택제어을 덮어쓰기한다. |
| InsertSelectListbox | 현재 선택의 목록 박스 선택제어을 덮어쓰기한다. |
| InsertTextArea | 현재 선택에 복수줄 텍스트 입력 제어를 덮어쓰기한다. |
| InsertUnorderedList | 현재 선택에 번호없는 목록(UL)과 보통 블럭양식으로 변경(toggle)시킨다. |
| Italic | 현재 선택을 위한 이태릭 글꼴과 보통 글꼴로 변경(toggle)시킨다. |
| JustifyCenter | 현재 선택이 위치된 블럭에서 중앙에 위치시킨다. |
| JustifyLeft | 현재 선택이 위치된 블럭에서 왼쪽에 위치시킨다. |
| JustifyRight | 현재 선택이 위치된 블럭에서 오른쪽에 위치시킨다. |
| LiveResize | MSHTML 편집기가, 완성되었을 때 업데이트하는 대신, 크기 변경이나 이동 작업 중 모양을 계속적으로 업데이트 한다. |
| MultipleSelection | 사용자가 SHIFT나 CTRL 키를 누르고 선택할 때, 한개이상의 선택항목을 선택할 수 있게한다. |
| Outdent | 현재 선택을 들여쓰기 한단계만큼 내 쓰기(왼쪽으로 이동) 한다. |
| OverWrite | 택스트 입력 필드를 삽입모드과 수정모드(덮어씌움)으로 변경(toggle)시킨다. |
| Paste | 현재 선택의 내용을 클립보드의 내용으로 덮어쓰기한다(붙여넣기). |
| 현재의 페이지를 인쇄할 수 있도록 사용자에게 인쇄 대화창을 열어준다. | |
| Refresh | 현재의 문서을 새로고침한다. |
| RemoveFormat | 현재 선택의 양식 태그를 제거한다. |
| SaveAs | 현재의 문서을 다른이름으로 저장한다. |
| SelectAll | 현재의 문서 전체를 선택하여 반전시킨다. |
| UnBookmark | 현재의 선택으로부터 북마크를 제거한다. |
| Underline | 현재 선택을 위한 밑줄친 글꼴과 보통 글꼴로 변경(toggle)시킨다. |
| Unlink | 현재의 선택으로부터 연결을 제거한다. |
| Unselect | 현재의 선택을 제거한다. |
'Web > JavaScript' 카테고리의 다른 글
| Javascript - document.execCommand Method (0) | 2011/07/19 |
|---|---|
| Javascript - Ajax module on OWA(MS Outlook Web Apps.) (0) | 2011/03/15 |
| for Javascript (0) | 2011/03/08 |
| Javascript - Selection text of web page (0) | 2011/03/05 |
| Persisting Collapsible TOC State (0) | 2011/03/02 |
| Add Twitter to your blog (2) | 2010/11/05 |
Javascript - Ajax module on OWA(MS Outlook Web Apps.)

잠시 참고용으로 분석한 내용;
var POST="POST";
var GET="GET";
if(!g_fModuleLoaded)var g_fModuleLoaded={};
if(!g_fModuleLoaded[".\\dom/ajaxrequest.js".toLowerCase()])(function(){
Type.createNamespace("Owa.Dom");
var fChecked=false;
var fUseNative=true;
var rgRequests=[];
Owa.Dom.AjaxRequest = function Owa$Dom$AjaxRequest(sUrl,sCmd,oCtx,cb,fSync,fNeverDispose){
var oXHR;
if(fChecked){
oXHR=fUseNative ? new XMLHttpRequest() : new ActiveXObject("MSXML2.xmlhttp")
}
else
{
try
{
oXHR=new XMLHttpRequest();
fUseNative=true
}
catch(e)
{
oXHR=new ActiveXObject("MSXML2.xmlhttp");
fUseNative=false
}
fChecked=true
}
this.oXmlHttp=oXHR;
this.oXmlHttp.open(sCmd,sUrl,!fSync);
this.sUrl=sUrl;
this.oCtx=oCtx;
this.fSync=fSync;
this.fLock=false;
this._fNeverDispose=!!fNeverDispose;
this.iIndex=rgRequests.length;
rgRequests.push(this);
if(cb){
this.cb=cb;
if(!fSync){
this.oXmlHttp.onreadystatechange=new Function("Owa.Dom.AjaxRequest._cbOnReadyStateChange("+this.iIndex+");")
}
}
Owa.Dom.AjaxRequest.get_OnRequestCreated().dispatch(this)
};
Owa.Dom.AjaxRequest.prototype.send=function Owa$Dom$AjaxRequest$send(sBody){
if(isDf(typeof(sBody))){
this.oXmlHttp.send(sBody)
}
else{
this.oXmlHttp.send(null)
}
if(this.fSync){
return this.onComplete()
}
else{
return null
}
};
Owa.Dom.AjaxRequest.prototype.setRequestHeader=function Owa$Dom$AjaxRequest$setRequestHeader(sHeaderName,sHeaderValue){
this.oXmlHttp.setRequestHeader(sHeaderName,sHeaderValue)
};
Owa.Dom.AjaxRequest.prototype.cancelCallback=function Owa$Dom$AjaxRequest$cancelCallback(){
if(this.fLock)throw"cannot cancel the callback when it is already finished or cancelled";
this.fLock=true;
rgRequests[this.iIndex].oXmlHttp.abort();
delete rgRequests[this.iIndex]
};
Owa.Dom.AjaxRequest.prototype.onComplete=function Owa$Dom$AjaxRequest$onComplete(){
if(!this.fLock)
{
this.fLock=true;
Owa.Dom.AjaxRequest.get_OnResponseReceived().dispatch(this);
var oCallbackResult=null;
if(this.cb!=null)oCallbackResult=this.cb(this);
delete rgRequests[this.iIndex];
Owa.Dom.AjaxRequest.get_OnCallbackCompleted().dispatch(this);
return oCallbackResult
}
};
Owa.Dom.AjaxRequest._cbOnReadyStateChange=function Owa$Dom$AjaxRequest$_cbOnReadyStateChange(i){
var oRequest=rgRequests[i];
if(oRequest&&4==oRequest.oXmlHttp.readyState){
if(0==oRequest.oXmlHttp.status&&(Owa.Utility.isFirefox()||Owa.Utility.isSafari())){
oRequest.cancelCallback()
}
else{
oRequest.onComplete()
}
}
};
Owa.Dom.AjaxRequest.disposeAjaxRequests=function Owa$Dom$AjaxRequest$disposeAjaxRequests(){
for(var i=0;i<rgRequests.length;i++){
if(rgRequests[i]){
var oR=rgRequests[i];
if(oR._fNeverDispose)continue;
Owa.Dom.AjaxRequest.abortAnXMLHttpRequest(oR.oXmlHttp);
rgRequests[i]=null
}
}
};
Owa.Dom.AjaxRequest.abortAjaxRequests=function Owa$Dom$AjaxRequest$abortAjaxRequests(sNs,oCmd){
var oR=null;
for(var i=0;i<rgRequests.length;i++){
oR=rgRequests[i];
if(oR&&oR.oCtx&&isDf(typeof(oR.oCtx.sNs))&&(oR.oCtx.sNs==sNs)&&isDf(typeof(oR.oCtx.sEv))&&isDf(typeof(oCmd[oR.oCtx.sEv]))){
if(oR.fLock) continue;
oR.fLock=true;
Owa.Dom.AjaxRequest.abortAnXMLHttpRequest(oR.oXmlHttp);
rgRequests[i]=null
}
}
};
Owa.Dom.AjaxRequest.abortAnXMLHttpRequest=function Owa$Dom$AjaxRequest$abortAnXMLHttpRequest(oX){
if(isDf(typeof(oX))&&oX&&isDf(typeof(oX.abort))){
try{
oX.onreadystatechange=function(){};
oX.abort()
}
catch(e){}
}
};
var ON_REQUEST_CREATED="onRequestCreated";
var ON_RESPONSE_RECEIVED="onResponseReceived";
var ON_CALLBACK_COMPLETED="onCallbackCompleted";
var _oStaticEvents={};
_oStaticEvents[ON_REQUEST_CREATED]=new Owa.Utility.EventHandlerCollection();
_oStaticEvents[ON_RESPONSE_RECEIVED]=new Owa.Utility.EventHandlerCollection();
_oStaticEvents[ON_CALLBACK_COMPLETED]=new Owa.Utility.EventHandlerCollection();
Owa.Dom.AjaxRequest.get_OnRequestCreated=function Owa$Dom$AjaxRequest$get_OnRequestCreated(){
return _oStaticEvents[ON_REQUEST_CREATED]
};
Owa.Dom.AjaxRequest.get_OnResponseReceived=function Owa$Dom$AjaxRequest$get_OnResponseReceived(){
return _oStaticEvents[ON_RESPONSE_RECEIVED]
};
Owa.Dom.AjaxRequest.get_OnCallbackCompleted=function Owa$Dom$AjaxRequest$get_OnCallbackCompleted(){
return _oStaticEvents[ON_CALLBACK_COMPLETED]
}
})();
g_fModuleLoaded[".\\dom/ajaxrequest.js".toLowerCase()]=1;
'Web > JavaScript' 카테고리의 다른 글
| Javascript - document.execCommand Method (0) | 2011/07/19 |
|---|---|
| Javascript - Ajax module on OWA(MS Outlook Web Apps.) (0) | 2011/03/15 |
| for Javascript (0) | 2011/03/08 |
| Javascript - Selection text of web page (0) | 2011/03/05 |
| Persisting Collapsible TOC State (0) | 2011/03/02 |
| Add Twitter to your blog (2) | 2010/11/05 |
http://james.newtonking.com/archive/2011/01/03/json-net-4-0-release-1-net-4-and-windows-phone-support.aspx
* Mobile Web Apps - Cross Platform JS Framework
http://ajaxian.com/archives/yo-yo-developer-killer-cross-platform-mobile-web-apps-with-jo
* JQuery Data Binding
http://ajaxian.com/archives/jquery-data-binding-templates-and-mobile-john-resig-at-fowa
* Gmail's how to Drag & Drop from desktop works
http://ajaxian.com/archives/how-gmails-drag-and-drop-from-the-desktop-works
* JS 아닌 이외 기술
HTML5 Link 테그를 이용한 Prefetching
http://ajaxian.com/archives/html5-link-prefetching
* interest
http://thewildernessdowntown.com/
'Web > JavaScript' 카테고리의 다른 글
| Javascript - document.execCommand Method (0) | 2011/07/19 |
|---|---|
| Javascript - Ajax module on OWA(MS Outlook Web Apps.) (0) | 2011/03/15 |
| for Javascript (0) | 2011/03/08 |
| Javascript - Selection text of web page (0) | 2011/03/05 |
| Persisting Collapsible TOC State (0) | 2011/03/02 |
| Add Twitter to your blog (2) | 2010/11/05 |
아주 간단 명료하게...
웹 페이지에서 텍스트 영역을 마우스로 긁은 상태에서
브라우저 주소표시줄에
javascript:document.selection.createRange().text
위 스크립트를 테스트해보면 알 수 있다...
(너무 심플..)
'Web > JavaScript' 카테고리의 다른 글
| Javascript - Ajax module on OWA(MS Outlook Web Apps.) (0) | 2011/03/15 |
|---|---|
| for Javascript (0) | 2011/03/08 |
| Javascript - Selection text of web page (0) | 2011/03/05 |
| Persisting Collapsible TOC State (0) | 2011/03/02 |
| Add Twitter to your blog (2) | 2010/11/05 |
| JSINQ - LINQ With JavaScript (0) | 2010/04/10 |
Behavior를 이용해 상태를 기억하고 history.back이 작동하였을 때
기억해둔 정보를 다시 로드하는 방식을 제공합니다.
아무래도 IE에서만 될 것 같은데...
History 를 기억하도록 스타일에 behavior를 지정한 후 사용하면 되고<META NAME="save" CONTENT="history"> <STYLE> .saveHistory {behavior:url(#default#savehistory);} </STYLE>
Code sample page를 제공하니 한번 눈으로 보면 좀 더 쉽게 이해될 것 같네요.
code sample : http://samples.msdn.microsoft.com/workshop/samples/author/persistence/saveHistory_ht1.htm
'Web > JavaScript' 카테고리의 다른 글
| for Javascript (0) | 2011/03/08 |
|---|---|
| Javascript - Selection text of web page (0) | 2011/03/05 |
| Persisting Collapsible TOC State (0) | 2011/03/02 |
| Add Twitter to your blog (2) | 2010/11/05 |
| JSINQ - LINQ With JavaScript (0) | 2010/04/10 |
| Javascript - Element Opacity Control for Cross Browser (0) | 2010/02/18 |
훈스닷넷에서 재미있는 글을 발견해서 아래처럼 스크랩 해왔습니다 ^ ^
Javascript에서 LINQ 문법을 사용할 수 있다는 점이 정말 재밌네요~
아래 글을 참고해주세요 ~~
Ajaxian에서 어제 흥미로운 기사를 봐서 블로깅후에 훈스닷넷 개시판에도 남깁니다.
JSINQ란 녀석이구요.
자바스크립트의 객체나 데이터를 Enumerable 한객체로 변경한뒤에 LINQ문법을 사용할수 있는데요.
제어폭도 생각보다 넓고 놀라운건 .NET 프레임웍 3.5의 연산자를 모두 지원하구요.(ajaxian에는 3.0이라고 나와있는데 codeplex문서는 3.5군요) generic의 확장함수또한 비슷한형식으로 지원하며.. 4.0의 zip머시기 (먼지모름) 도 지원한다고하내요.
자세한 내용은 해당테스트 페이와 관련 문서 자료가서셔 보시면 알겠지만 테스트페이지에서 보면 신기하긴하군요.
해당테스트페이지 바로가기
관련문서 및 자료
'Web > JavaScript' 카테고리의 다른 글
| Persisting Collapsible TOC State (0) | 2011/03/02 |
|---|---|
| Add Twitter to your blog (2) | 2010/11/05 |
| JSINQ - LINQ With JavaScript (0) | 2010/04/10 |
| Javascript - Element Opacity Control for Cross Browser (0) | 2010/02/18 |
| Ext JS 3.0 (0) | 2009/09/23 |
| Javascript : Microsoft OS & Internet Explorer Agent Check (0) | 2009/07/20 |
Javascript - Element Opacity Control for Cross Browser

자바스크립트로 HTML Element의 투명도(Opacity)를 조절하는 경우 크로스 브라우저(Cross Browser)를 지원하기 위해 삽질을 하게 된다.
이럴 때 아래 코드를 이용하자
function setOpacity(id, opacity) {
var object = id.style;object.opacity = (opacity / 100);
object.filter = "alpha(opacity=" + opacity + ")";
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
}
'Web > JavaScript' 카테고리의 다른 글
| Add Twitter to your blog (2) | 2010/11/05 |
|---|---|
| JSINQ - LINQ With JavaScript (0) | 2010/04/10 |
| Javascript - Element Opacity Control for Cross Browser (0) | 2010/02/18 |
| Ext JS 3.0 (0) | 2009/09/23 |
| Javascript : Microsoft OS & Internet Explorer Agent Check (0) | 2009/07/20 |
| Javascript – 이벤트 추가 (0) | 2009/05/08 |
http://www.extjs.com/blog/2009/08/10/ext-js-30-be-outstanding/
UI 관련 JavaScript 라이브러리로 유명한 ExtJS 3.0이 얼마전에 나왔죠.
크게 바뀐 점은 많이 사용해보지 않은 저는 잘 모르겠군요.
대신 아래 발췌해온 내용 처럼 Designer Preview 라는 내용이 흥미롭군요.
Adobe Air 프로그램으로 ExtJS 를 이용한 디자인을 하고 미리보면서 작업할 수 있어요.
UI를 보면서 작업한다는게 참 멋지고 좋을듯..?
Designer Preview
Constructing your interfaces in code will be a thing of the past. We are releasing a Designer Preview that will allow you to experiment with the designer interface and to explore how configs affect your layout. Soon, you will be able to build your application components using base Ext components and Certified User Extensions.
Code generation is currently not available. Our intentions are to charge a fee for this service and to enable our community to create and sell their creations on our marketplace. Our goals are lofty. We want to be the iTunes of Web App Development.
'Web > JavaScript' 카테고리의 다른 글
| JSINQ - LINQ With JavaScript (0) | 2010/04/10 |
|---|---|
| Javascript - Element Opacity Control for Cross Browser (0) | 2010/02/18 |
| Ext JS 3.0 (0) | 2009/09/23 |
| Javascript : Microsoft OS & Internet Explorer Agent Check (0) | 2009/07/20 |
| Javascript – 이벤트 추가 (0) | 2009/05/08 |
| 스크립트에서 클라이언트 프로그램 실행 시키는 방법 (3) | 2009/02/17 |
얼마전에 댓글로 문의하신 분이 있는데..
정말 잘 정리된 내용이 있었군요.
아쉽지만 영문이라 문제지만,
그래도 참 좋은 내용의 사이트인 것은 확실합니다.
'Web > AJAX' 카테고리의 다른 글
| For Beginner XML DOM & Javascript Guide (0) | 2009/09/16 |
|---|---|
| Ajax 호출의 일반적인 패턴 (0) | 2007/08/21 |
| ASP.NET에서 사용할 정말 편한 Ajax Library (2) | 2007/08/18 |
| Ajax Pattern (0) | 2007/08/08 |
| Ajax DOM 제어 (0) | 2007/07/08 |
| Ajax를 통해 특정영역에 페이지 로드 (0) | 2007/07/05 |
Javascript : Microsoft OS & Internet Explorer Agent Check

Web Page에서 브라우저와 OS에 따라 다른 조치를 해야 하는 경우가 있습니다.
그래서 브라우저에서 받아올 수 있는 User Agent 값을 분석해서 이에 이용하게 되죠.
다음과 같이 값을 체크하는 부분을 공통으로 작성하여 가져다가 쓰면 좋을 것 같네요.
테스트 페이지(Test page): BrowserTest.html
<html>
<head>
<title>Browser Agent Test</title>
<script type="text/javascript">
function BrowserIs()
{
var agt = navigator.userAgent.toLowerCase();
this.osver = 1.0;
if (agt)
{
var stOSVer = agt.substring(agt.indexOf("windows ") + 11);
this.osver = parseFloat(stOSVer);
}
this.major = parseInt(navigator.appVersion);
this.nav = ((agt.indexOf('mozilla')!=-1)&&((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1)));
this.nav2 = (this.nav && (this.major == 2));
this.nav3 = (this.nav && (this.major == 3));
this.nav4 = (this.nav && (this.major == 4));
this.nav6 = this.nav && (this.major == 5);
this.nav6up = this.nav && (this.major >= 5);
this.nav7up = false;
if (this.nav6up)
{
var navIdx = agt.indexOf("netscape/");
if (navIdx >=0 )
this.nav7up = parseInt(agt.substring(navIdx+9)) >= 7;
}
this.ie = (agt.indexOf("msie")!=-1);
this.aol = this.ie && agt.indexOf(" aol ")!=-1;
if (this.ie)
{
var stIEVer = agt.substring(agt.indexOf("msie ") + 5);
this.iever = parseInt(stIEVer);
this.verIEFull = parseFloat(stIEVer);
}
else
this.iever = 0;
this.ie3 = ( this.ie && (this.major == 2));
this.ie4 = ( this.ie && (this.major == 4));
this.ie4up = this.ie && (this.major >=4);
this.ie5up = this.ie && (this.iever >= 5);
this.ie55up = this.ie && (this.verIEFull >= 5.5);
this.ie6up = this.ie && (this.iever >= 6);
this.ie7up = this.ie && (this.iever >= 7);
this.ie8up = this.ie && (this.iever >= 8);
this.win16 = ((agt.indexOf("win16")!=-1)
|| (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1)
|| (agt.indexOf("windows 16-bit")!=-1) );
this.win31 = (agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
(agt.indexOf("windows 16-bit")!=-1);
this.win98 = ((agt.indexOf("win98")!=-1)||(agt.indexOf("windows 98")!=-1));
this.win95 = ((agt.indexOf("win95")!=-1)||(agt.indexOf("windows 95")!=-1));
this.winnt = ((agt.indexOf("winnt")!=-1)||(agt.indexOf("windows nt")!=-1));
this.win32 = this.win95 || this.winnt || this.win98 ||
((this.major >= 4) && (navigator.platform == "Win32")) ||
(agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1);
this.os2 = (agt.indexOf("os/2")!=-1)
|| (navigator.appVersion.indexOf("OS/2")!=-1)
|| (agt.indexOf("ibm-webexplorer")!=-1);
this.mac = (agt.indexOf("mac")!=-1);
this.mac68k = this.mac && ((agt.indexOf("68k")!=-1) ||
(agt.indexOf("68000")!=-1));
this.macppc = this.mac && ((agt.indexOf("ppc")!=-1) ||
(agt.indexOf("powerpc")!=-1));
this.w3c = this.nav6up;
}
function ObjectStripShow(obj, outputDivId)
{
var outputStr = "";
for (var i in obj) outputStr += i + " = " + eval('obj.' + i) + "<br/>\n";
if (outputDivId == null || document.getElementById(outputDivId) == null)
document.write(outputStr);
else
document.getElementById(outputDivId).innerHTML = outputStr;
}
window.onload = function()
{
var bi = new BrowserIs();
ObjectStripShow(bi, 'output');
};
</script></head>
<body>
<div id="output">
</div>
</body>
</html>
결과(Result ):
osver = 5.2
major = 4
nav = false
nav2 = false
nav3 = false
nav4 = false
nav6 = false
nav6up = false
nav7up = false
ie = true
aol = false
iever = 7
verIEFull = 7
ie3 = false
ie4 = true
ie4up = true
ie5up = true
ie55up = true
ie6up = true
ie7up = true
ie8up = false
win16 = false
win31 = false
win98 = false
win95 = false
winnt = true
win32 = true
os2 = false
mac = false
mac68k = false
macppc = false
w3c = false
'Web > JavaScript' 카테고리의 다른 글
| Javascript - Element Opacity Control for Cross Browser (0) | 2010/02/18 |
|---|---|
| Ext JS 3.0 (0) | 2009/09/23 |
| Javascript : Microsoft OS & Internet Explorer Agent Check (0) | 2009/07/20 |
| Javascript – 이벤트 추가 (0) | 2009/05/08 |
| 스크립트에서 클라이언트 프로그램 실행 시키는 방법 (3) | 2009/02/17 |
| [js]브라우저의 오른쪽 상단의 X표시를 누르거나 창을 닫을때 이벤트 잡기! (1) | 2009/01/05 |

Prev




