대문: 두 판 사이의 차이
보이기
편집 요약 없음 |
편집 요약 없음 |
||
| 117번째 줄: | 117번째 줄: | ||
}; | }; | ||
</script> | </script> | ||
---- | |||
<form id="selectSearch" action="/wiki/index.php/Special:Search" method="get"> | |||
<select id="scope"> | |||
<option value="all">전체</option> | |||
<option value="site">유적</option> | |||
<option value="term">용어명</option> | |||
</select> | |||
<input type="search" name="search" id="q"> | |||
<button type="submit">검색</button> | |||
</form> | |||
<script> | |||
document.getElementById('selectSearch').onsubmit = function () { | |||
const q = document.getElementById('q'); | |||
const scope = document.getElementById('scope').value; | |||
if (scope === 'site') q.value += ' incategory:유적'; | |||
if (scope === 'term') q.value += ' incategory:용어'; | |||
}; | |||
</script> | |||
</html> | </html> | ||


