묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
현재창의 form과 iframe의 form을 연동하는데 도움좀 부탁드립니다!
2017.02.14 11:05
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
<style>
.t{
width: 30px;
maxlength:4;
text-align:center;
}
</style>
</head>
<body>
<form name="ex" action="#" method="post"/>
<input type="text" id="uname" name="uname" placeholder="예약자명" /><br />
<input type="text" id = "pw" name="pw" placeholder="패스워드" /><br />
<input class="t" type="text" name="t1" value="010" />-
<input class="t" type="text" name="t2" />-
<input class="t" type="text" name="t3" /><br />
<textarea placeholder="메모"></textarea>
<input type="submit" value="확인" onclick="send();"/>
</form>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
<style>
.t{
width: 30px;
maxlength:4;
text-align:center;
}
</style>
</head>
<body>
<form name="ex" action="#" method="post"/>
<input type="text" id="uname" name="uname" placeholder="예약자명" /><br />
<input type="text" id = "pw" name="pw" placeholder="패스워드" /><br />
<input class="t" type="text" name="t1" value="010" />-
<input class="t" type="text" name="t2" />-
<input class="t" type="text" name="t3" /><br />
<textarea placeholder="메모"></textarea>
<input type="submit" value="확인" onclick="send();"/>
</form>
<iframe width="1000" height="1000" id="reserv" name="reserv" src="http://exguest.dothome.co.kr/reservation"> </iframe>
<script type="text/javascript">
var ifrw = (reserv.contentWindow) ? reserv.contentWindow : (reserv.contentDocument.document) ? reserv.contentDocument.document : reserv.contentDocument;
document.write(ifrw);
function send(){
alert(document.ex.uname.value);
//alert(document.getElementById('reserv').contentWindow.document.getElementById("nick_name");
return false;
}
</script>
</body>
</html>
<script type="text/javascript">
var ifrw = (reserv.contentWindow) ? reserv.contentWindow : (reserv.contentDocument.document) ? reserv.contentDocument.document : reserv.contentDocument;
document.write(ifrw);
function send(){
alert(document.ex.uname.value);
//alert(document.getElementById('reserv').contentWindow.document.getElementById("nick_name");
return false;
}
</script>
</body>
</html>
-------------------------
현재 이까지했는데 아무리해도 답이 안나옵니다.
현재 이까지했는데 아무리해도 답이 안나옵니다.
예약자명, 비밀번호, 연락처, 메모가 iframe에 입력되고 submit까지 되게 연동하려는데
도움좀 부탁드립니다!!
※ iframe 안에 input 은 전부 id와 name을 들고 있습니다.