|
인풋창 |
결과창 (name=main) |
프레임셋으로 나눠서
폼 태그로요,
인풋에 예를 들어 333 이라고 입력하고 서브밋하면
abc.com/333 이라는 페이지가
인풋에 예를 들어 555 이라고 입력하고 서브밋하면
abc.com/555 이라는 페이지가
오른쪽 프레임에 뜨게 하고싶거든요~
abc.com 이라는도메인은 고정시키고, 도메인+입력한값으로 페이지 이동 시키고 싶어요~
Copy
<base target="main">
<form action="https://abc.com/" method="get">
<input type="text" name="name">
<input type="submit" id="enter" value="GO">
</form>
이렇게 하는게 맞나요???
답변 1개 / 댓글 3개
채택된 답변
+20 포인트
2022-01-21 (금) 16:29:44
<form action="https://abc.com/" method="get" target="main">
이요~
답변에 대한 댓글 3개
HunyStyle
2022-01-22 (토) 15:22:45
2022-02-03 (목) 09:04:57
HunyStyle
2022-02-03 (목) 17:00:25
eyekiss 님께서 알려주셨어요 ^^
답변 감사합니다~~ ^^
https://sir.kr/qa/446459
[code]
<form name="goform" action="https://abc.com" method="get" target="body" onsubmit="form_submit()">
<input type="text" name="name" style="width: 100px;"><br>
<input type="submit" value="GO" style="width: 100px;">
</form>
function form_submit() {
document.goform.action = "https://abc.com/"+document.goform.name.value;
document.goform.submit();
}
[/code]
답변 감사합니다~~ ^^
https://sir.kr/qa/446459
[code]
<form name="goform" action="https://abc.com" method="get" target="body" onsubmit="form_submit()">
<input type="text" name="name" style="width: 100px;"><br>
<input type="submit" value="GO" style="width: 100px;">
</form>
function form_submit() {
document.goform.action = "https://abc.com/"+document.goform.name.value;
document.goform.submit();
}
[/code]
답변을 작성하려면 로그인이 필요합니다.
저렇게 하고
<form action="https://abc.com" method="get" target="body">
<input type="text" name="name" style="width: 100px;"><br>
<input type="submit" value="GO" style="width: 100px;">
</form>
aaa라는 값을 입력후, 버튼클릭하면
https://abc.com/aaa 페이지가 떠야하는데, https://abc.com/ 만 뜨네요 ㅜ
어디가 잘못된걸까요? ㅎㅎ