javascript 팁이 있는 곳입니다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 109

0

조회 수 : 13616 신고 : 0

profile
작성자 : title: [ani]깜빡이는 표정빽짱구
포인트 : 56933 | 레벨 : 25
미리보기 :  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
var TRange = null;
var dupeRange = null;
var TestRange = null;
var win = null;

var nom = navigator.appName.toLowerCase();
var agt = navigator.userAgent.toLowerCase();
var is_major   = parseInt(navigator.appVersion);
var is_minor   = parseFloat(navigator.appVersion);
var is_ie      = (agt.indexOf("msie") != -1);
var is_ie4up   = (is_ie && (is_major >= 4));
var is_not_moz = (agt.indexOf('netscape')!=-1)
var is_nav     = (nom.indexOf('netscape')!=-1);
var is_nav4    = (is_nav && (is_major == 4));
var is_mac     = (agt.indexOf("mac")!=-1);
var is_gecko   = (agt.indexOf('gecko') != -1);
var is_opera   = (agt.indexOf("opera") != -1);

var is_rev=0
if (is_gecko) {
    temp = agt.split("rv:")
    is_rev = parseFloat(temp[1])
}

var frametosearch = self;

function search(whichform, whichframe) {
    if (is_ie4up && is_mac) return;
    if (is_gecko && (is_rev <1)) return;
    if (is_opera) return;
    if(whichform.findthis.value!=null && whichform.findthis.value!='') {
       str = whichform.findthis.value;
       win = whichframe;
       var frameval=false;
       if(win!=self) {

       frameval=true;  // this will enable Nav7 to search child frame
       win = parent.frames[whichframe];
    }
}

else
return;

var strFound;

if(is_nav4 && (is_minor < 5)) {
    strFound=win.find(str);
}

if (is_gecko && (is_rev >= 1)) {
    if(frameval!=false) win.focus(); // force search in specified child frame
    strFound=win.find(str, false, false, true, false, frameval, false);

    if (is_not_moz)  whichform.findthis.focus();
}

if (is_ie4up) {
  if (TRange!=null) {
     
   TestRange=win.document.body.createTextRange();

     

   if (dupeRange.inRange(TestRange)) {

   TRange.collapse(false);
   strFound=TRange.findText(str);
    if (strFound) {
        //the following line added by Mike and Susan Keenan, 7 June 2003
        win.document.body.scrollTop = win.document.body.scrollTop + TRange.offsetTop;
        TRange.select();
        }
   }
 
   else {

     TRange=win.document.body.createTextRange();
     TRange.collapse(false);
     strFound=TRange.findText(str);
     if (strFound) {
        //the following line added by Mike and Susan Keenan, 7 June 2003
        win.document.body.scrollTop = TRange.offsetTop;
        TRange.select();
        }

   }
  }
 
   if (TRange==null || strFound==0) {
   TRange=win.document.body.createTextRange();
   dupeRange = TRange.duplicate();
   strFound=TRange.findText(str);
    if (strFound) {
        //the following line added by Mike and Susan Keenan, 7 June 2003
        win.document.body.scrollTop = TRange.offsetTop;
        TRange.select();
        }
  
   }

}

  if (!strFound) alert ("찾으시는 '"+str+"' 에 대한 검색결과가 없습니다!") // string not found
       
}
// -->
</script>

</head>

<body>
<form name="form1" onSubmit="search(document.form1, frametosearch); return false"><input type="text" name="findthis" size="15" title="Press 'ALT s' after clicking submit to repeatedly search page"> <input type="submit" value="Find in Page" ACCESSKEY="s"></form>
이곳의 글들을 검색합니다.

</body>
</html>


자료출처 : http://www.blueb.co.kr/bbs.php?table=JS_17&query=view&uid=5&p=

태그
profile 글쓴이 빽짱구

단점이 없는 사람은 장점도 거의 없다 - 에이브러햄 링컨

엮인글 :
https://web.webmini.net/javascript/29647/70f/trackback
소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

첫번째 댓글을 남겨주세요!

List of Articles
번호 제목 글쓴이 날짜 추천 수 조회 수sort
9 best of best 메트릭스 효과 문자 title: [ani]깜빡이는 표정빽짱구 2004-04-21 22 4921
8 렌덤배경 이미지 title: [ani]깜빡이는 표정빽짱구 2004-02-22 13 4921
7 상태표시줄 바꿔보자4 (소문자가 대문자로) [1] title: [ani]깜빡이는 표정빽짱구 2004-02-07 13 4916
6 상태표시줄을 바꿔보자5 (마퀴형식) title: [ani]깜빡이는 표정빽짱구 2004-02-07 14 4790
5 best of best 상태표시줄 바꿔보자2 title: [ani]깜빡이는 표정빽짱구 2004-02-07 20 4778
4 손님이 원하는색을 입력받아 배경화면으로 적용하기! title: [ani]깜빡이는 표정빽짱구 2004-02-29 19 4744
3 상태표시줄을 바꿔보자6 (시간넣기) title: [ani]깜빡이는 표정빽짱구 2004-02-07 12 4692
2 생활코딩이라는 사이트입니다. [3] title: [ani]깜빡이는 표정빽짱구 2014-05-14   2477
1 모바일 접속시 특정 페이지로 이동 title: [ani]깜빡이는 표정빽짱구 2018-10-21   356