대문: 두 판 사이의 차이
보이기
편집 요약 없음 |
편집 요약 없음 |
||
| 8번째 줄: | 8번째 줄: | ||
</inputbox> | </inputbox> | ||
<br/><br/> | <br/><br/> | ||
<inputbox> | <inputbox> | ||
| 16번째 줄: | 15번째 줄: | ||
placeholder=사전 표제어 입력 | placeholder=사전 표제어 입력 | ||
</inputbox> | </inputbox> | ||
<html> | <html> | ||
| 31번째 줄: | 28번째 줄: | ||
</form> | </form> | ||
---- | |||
<form id="dualSearch" action="/wiki/index.php/Special:Search" method="get"> | <form id="dualSearch" action="/wiki/index.php/Special:Search" method="get"> | ||
| 53번째 줄: | 51번째 줄: | ||
</button> | </button> | ||
</form> | </form> | ||
---- | |||
<form action="/wiki/index.php/Special:Search" method="get"> | <form action="/wiki/index.php/Special:Search" method="get"> | ||
| 76번째 줄: | 76번째 줄: | ||
</form> | </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> | |||
</html> | </html> | ||


