|
|
| 1번째 줄: |
1번째 줄: |
| <br/><br/>
| |
| <inputbox>
| |
| type=search
| |
| width=25
| |
| buttonlabel=이동
| |
| searchbuttonlabel=본문 검색
| |
| break=no
| |
| </inputbox>
| |
| <br/><br/>
| |
|
| |
| <inputbox>
| |
| type=search
| |
| searchtype=go
| |
| buttonlabel=항목 검색
| |
| placeholder=사전 표제어 입력
| |
| </inputbox>
| |
|
| |
| <html> | | <html> |
| <form action="/wiki/index.php" method="get">
| |
| <input type="search" name="search" placeholder="표제어 검색 (제목 일치)">
| |
| <input type="submit" value="표제어 검색">
| |
| </form>
| |
|
| |
| <form action="/wiki/index.php/Special:Search" method="get">
| |
| <input type="search" name="search" placeholder="본문 전체 검색">
| |
| <input type="hidden" name="fulltext" value="1">
| |
| <input type="submit" value="본문 검색">
| |
| </form>
| |
|
| |
| ----
| |
|
| |
| <form id="dualSearch" action="/wiki/index.php/Special:Search" method="get">
| |
| <input
| |
| type="search"
| |
| name="search"
| |
| placeholder="검색어 입력"
| |
| style="width: 360px; max-width: 90%; padding: 6px;"
| |
| />
| |
|
| |
| <!-- 본문 검색 버튼을 눌렀을 때만 fulltext=1을 넣기 위한 hidden -->
| |
| <input type="hidden" name="fulltext" id="fulltextFlag" value="" />
| |
|
| |
| <!-- 표제어 검색(Go): fulltext 파라미터 없이 제출 -->
| |
| <button type="submit" onclick="document.getElementById('fulltextFlag').value='';">
| |
| 표제어 검색
| |
| </button>
| |
|
| |
| <!-- 본문 포함 검색: fulltext=1로 제출 -->
| |
| <button type="submit" onclick="document.getElementById('fulltextFlag').value='1';">
| |
| 본문 포함 검색
| |
| </button>
| |
| </form>
| |
|
| |
| ----
| |
|
| |
| <form action="/wiki/index.php/Special:Search" method="get">
| |
| <input type="search" name="search" placeholder="유적 검색">
| |
| <button type="submit"
| |
| onclick="
| |
| this.form.search.value =
| |
| this.form.search.value + ' incategory:유적';
| |
| ">
| |
| 유적 검색
| |
| </button>
| |
| </form>
| |
|
| |
| <form action="/wiki/index.php/Special:Search" method="get">
| |
| <input type="search" name="search" placeholder="개념 검색">
| |
| <button type="submit"
| |
| onclick="
| |
| this.form.search.value =
| |
| this.form.search.value + ' incategory:개념';
| |
| ">
| |
| 개념 검색
| |
| </button>
| |
| </form>
| |
|
| |
| ----
| |
|
| |
| <form id="smartSearch" action="/wiki/index.php/Special:Search" method="get">
| |
| <input
| |
| type="search"
| |
| name="search"
| |
| id="q"
| |
| placeholder="검색어 입력"
| |
| style="width:360px; padding:6px;"
| |
| />
| |
|
| |
| <input type="hidden" name="scope" id="scope" value="all">
| |
|
| |
| <button type="submit"
| |
| onclick="document.getElementById('scope').value='all';">
| |
| 전체
| |
| </button>
| |
|
| |
| <button type="submit"
| |
| onclick="document.getElementById('scope').value='site';">
| |
| 유적
| |
| </button>
| |
|
| |
| <button type="submit"
| |
| onclick="document.getElementById('scope').value='term';">
| |
| 개념
| |
| </button>
| |
| </form>
| |
|
| |
| <script>
| |
| document.getElementById('smartSearch').onsubmit = function () {
| |
| const q = document.getElementById('q');
| |
| const scope = document.getElementById('scope').value;
| |
|
| |
| if (scope === 'site') {
| |
| q.value += ' incategory:유적';
| |
| } else if (scope === 'term') {
| |
| q.value += ' incategory:개념';
| |
| }
| |
| };
| |
| </script>
| |
|
| |
| ----
| |
|
| |
| <form id="selectSearch" action="/wiki/index.php/Special:Search" method="get"> | | <form id="selectSearch" action="/wiki/index.php/Special:Search" method="get"> |
| <select id="scope"> | | <select id="scope"> |