사용자:강혜원: 두 판 사이의 차이
편집 요약 없음 |
편집 요약 없음 |
||
| 1번째 줄: | 1번째 줄: | ||
* 아래 링크로 | |||
** https://kstoryhub.visualasia.com/aistory/ccti_retrieve?server=kstorydata.visualasia.com&db=aiclassics2601&project=S2601057&id= | |||
* project는 각자 학번 / pagename | |||
<pre> | |||
<html lang="ko"> | <html lang="ko"> | ||
<head> | <head> | ||
| 37번째 줄: | 43번째 줄: | ||
</body> | </body> | ||
</html> | </html> | ||
</pre> | |||
2026년 4월 23일 (목) 03:31 판
- 아래 링크로
- project는 각자 학번 / pagename
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>ID 리다이렉트</title>
<style>
body { font-family: sans-serif; padding: 20px; }
.container { display: flex; gap: 10px; }
input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
button { padding: 8px 15px; cursor: pointer; background-color: #007bff; color: white; border: none; border-radius: 4px; }
button:hover { background-color: #0056b3; }
</style>
</head>
<body>
<h2>ID 입력 후 이동</h2>
<div class="container">
<input type="text" id="userId" placeholder="ID를 입력하세요" onkeypress="if(event.keyCode==13) redirectToUrl()">
<button onclick="redirectToUrl()">이동하기</button>
</div>
<script>
function redirectToUrl() {
// 입력창의 값을 가져옵니다.
const idValue = document.getElementById('userId').value;
if (idValue.trim() === "") {
alert("ID를 입력해주세요.");
return;
}
// 2. 입력받은 id 값을 가지고 지정된 URL로 redirect
const targetUrl = `http://app.vaquitalab.com/viewxml?id=${idValue}`;
window.location.href = targetUrl;
}
</script>
</body>
</html>