|
|
| 1번째 줄: |
1번째 줄: |
| − | <html>
| |
| − | <style>
| |
| − | #searchForm {
| |
| − | background-color: #fff;
| |
| − | border-radius: 5px;
| |
| − | padding: 20px;
| |
| − | display: flex;
| |
| − | align-items: center;
| |
| − | max-width: 600px; /* 최대 너비 설정 */
| |
| − | margin: 20px auto; /* 가운데 정렬 */
| |
| − | }
| |
| − | #searchInput {
| |
| − | flex: 1;
| |
| − | padding: 10px;
| |
| − | border: 1px solid #ccc;
| |
| − | border-radius: 5px;
| |
| − | font-size: 16px;
| |
| − | margin-right: 10px;
| |
| − | transition: border-color 0.3s;
| |
| − | }
| |
| − | #searchInput:focus {
| |
| − | border-color: #007bff;
| |
| − | outline: none;
| |
| − | }
| |
| − | input[type="submit"] {
| |
| − | background-color: #007bff;
| |
| − | color: #fff;
| |
| − | border: none;
| |
| − | border-radius: 5px;
| |
| − | padding: 10px 15px;
| |
| − | cursor: pointer;
| |
| − | font-size: 16px;
| |
| − | transition: background-color 0.3s;
| |
| − | }
| |
| − | input[type="submit"]:hover {
| |
| − | background-color: #0056b3;
| |
| − | }
| |
| − | </style>
| |
| − |
| |
| − | <form id="searchForm">
| |
| − | <input type="text" id="searchInput" placeholder="이청원과 관련된 검색어를 입력하세요" required>
| |
| − | <input type="submit" value="검색">
| |
| − | </form>
| |
| − |
| |
| − | <script>
| |
| − | document.getElementById('searchForm').onsubmit = function(event) {
| |
| − | event.preventDefault(); // 폼 제출 방지
| |
| − |
| |
| − | var searchInput = document.getElementById('searchInput').value;
| |
| − | var baseURL = "https://dh.aks.ac.kr/~nkh/wiki/index.php";
| |
| − | var title = "특수:검색";
| |
| − | var profile = "advanced";
| |
| − | var fulltext = "1";
| |
| − | var additionalKeywords = ["이청원", "디지털", "아카이브"]; // 추가 검색어 배열
| |
| − | additionalKeywords.push(searchInput); // 사용자 입력 추가
| |
| − |
| |
| − | var advancedSearch = '{"options":{"plain":["' + additionalKeywords.join('","') + '"]},"namespaces":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","2300","2301","2302","2303"]}';
| |
| − |
| |
| − | // 최종 URL 생성
| |
| − | var finalURL = baseURL + '?search=' + encodeURIComponent(additionalKeywords.join(' ')) +
| |
| − | '&title=' + encodeURIComponent(title) +
| |
| − | '&profile=' + encodeURIComponent(profile) +
| |
| − | '&fulltext=' + fulltext +
| |
| − | '&advancedSearch-current=' + encodeURIComponent(advancedSearch);
| |
| − |
| |
| − | // 새로운 URL로 리디렉션
| |
| − | window.location.href = finalURL;
| |
| − | };
| |
| − | </script>
| |
| − | </html>
| |
| − |
| |
| − | <html>
| |
| − | <style>
| |
| − | #searchForm {
| |
| − | background-color: #fff;
| |
| − | border-radius: 5px;
| |
| − | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
| |
| − | padding: 20px;
| |
| − | display: flex;
| |
| − | align-items: center;
| |
| − | max-width: 400px; /* 최대 너비 설정 */
| |
| − | margin: 20px auto; /* 가운데 정렬 */
| |
| − | }
| |
| − | #searchInput {
| |
| − | flex: 1;
| |
| − | padding: 10px;
| |
| − | border: 1px solid #ccc;
| |
| − | border-radius: 5px;
| |
| − | font-size: 16px;
| |
| − | margin-right: 10px;
| |
| − | transition: border-color 0.3s;
| |
| − | }
| |
| − | #searchInput:focus {
| |
| − | border-color: #007bff;
| |
| − | outline: none;
| |
| − | }
| |
| − | input[type="submit"] {
| |
| − | background-color: #007bff;
| |
| − | color: #fff;
| |
| − | border: none;
| |
| − | border-radius: 5px;
| |
| − | padding: 10px 15px;
| |
| − | cursor: pointer;
| |
| − | font-size: 16px;
| |
| − | transition: background-color 0.3s;
| |
| − | }
| |
| − | input[type="submit"]:hover {
| |
| − | background-color: #0056b3;
| |
| − | }
| |
| − | </style>
| |
| − |
| |
| − | <form id="searchForm">
| |
| − | <input type="text" id="searchInput" placeholder="검색어를 입력하세요" required>
| |
| − | <input type="submit" value="검색">
| |
| − | </form>
| |
| − |
| |
| − | <script>
| |
| − | document.getElementById('searchForm').onsubmit = function(event) {
| |
| − | event.preventDefault(); // 폼 제출 방지
| |
| − |
| |
| − | var searchInput = document.getElementById('searchInput').value;
| |
| − | var baseURL = "https://dh.aks.ac.kr/~nkh/wiki/index.php";
| |
| − | var title = "특수:검색";
| |
| − | var profile = "advanced";
| |
| − | var fulltext = "1";
| |
| − | var additionalKeywords = ["이청원", "디지털", "아카이브"]; // 추가 검색어 배열
| |
| − | additionalKeywords.push(searchInput); // 사용자 입력 추가
| |
| − |
| |
| − | var advancedSearch = '{"options":{"plain":["' + additionalKeywords.join('","') + '"]},"namespaces":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","2300","2301","2302","2303"]}';
| |
| − |
| |
| − | // 최종 URL 생성
| |
| − | var finalURL = baseURL + '?search=' + encodeURIComponent(additionalKeywords.join(' ')) +
| |
| − | '&title=' + encodeURIComponent(title) +
| |
| − | '&profile=' + encodeURIComponent(profile) +
| |
| − | '&fulltext=' + fulltext +
| |
| − | '&advancedSearch-current=' + encodeURIComponent(advancedSearch);
| |
| − |
| |
| − | // 새로운 URL로 리디렉션
| |
| − | window.location.href = finalURL;
| |
| − | };
| |
| − | </script>
| |
| − | </html>
| |
| − |
| |
| | | | |
| | <html> | | <html> |