텍스트 검색창 > 그누보드5 팁자료실

그누보드5 팁자료실

텍스트 검색창 정보

텍스트 검색창

본문

기존에 검색 마킹시스템에서 검색바를 추가 했습니다.

검색을 종료하고싶을때는 리프레쉬버튼을 클릭하여 페이지를 리로드 합니다. 

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    <li class="searchCon"><i class="fas fa-search" style="cursor:pointer;"></i></li>
      <li class="searchBar">
      <form id="f1" name="f1" action="javascript:void()">
        <input type="text" id="t1" name="t1" style="width:60px; font-size:20px; border:1px solid #eee;">
        <input type="button" value="검색" id="search_btn" style="font-size:16px; border:1px solid #eee; background-color:pink; padding:5px; color:white; border-radius:5px; cursor:pointer;">
      </from>
      </li>
 
 
 
    <script>
      let searchCon = document.querySelector(".searchCon");
      let textinput = document.querySelector(".searchBar");
      let searchIcob = document.querySelector(".fa-search");
      textinput.style.display = "none";
 
      searchCon.onclick = function searchBar(){
        
        if(textinput.style.display == "none" && searchCon.className == "searchCon"){
          searchCon.className += " searchOn"
          textinput.style.display = "";
          searchIcob.className = "fas fa-sync-alt";
        } else {
          searchCon.className = "searchCon"
          textinput.style.display = "none";
          history.go(0);
        }
      }
    </script>
cs
추천
0

댓글 1개

전체 2,431 |RSS
그누보드5 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT