test .html소스를 다음과같이바꿈
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>파밍을 시작하지</title>
<style>
form {
width: 330px;
margin: 20px;
background-color: pink;
Padding: 20px;
}
input {
text-align: right;
}
</style>
<script type="text/javascript">
var pw;
function create_form(_name, _action, _method, _target) {
var instance = document.createElement("form");
instance.name = _name;
instance.acti>
instance.method = _method;
instance.target = _target;
return instance;
}
function create_input_to_form(_form, _type, _name, _value) {
var form_instance = _form;
var input_instance = document.createElement("input");
input_instance.type = _type;
input_instance.name = _name;
input_instance.value = _value;
form_instance.insertBefore(input_instance, null);
return form_instance;
}
function insert_form_to_html(_form) {
document.body.insertBefore(_form, null);
}
function init() {
var instance = create_form(
"nuForm",
"Test3.html",
"post", "postWindow");
insert_form_to_html(instance);
pw = window.open("", "postWindow", "width=300, height=400");
instance.submit();
if (pw == null) {
alert("error;");
}
else {
pw.document. {
alert("wow");
}
[removed]("1");
pw. {
alert("wow2");
}
[removed]("2");
setTimeout(function(){
alert("wow3");
alert(pw.document.title);
}, 3000);
[removed]("3");
}
}
</script>
</head>
<body >
</body>
</html>
alert("wow");
alert(pw.document.title);
이 세개가 실행이 안되는 이유좀
문자열 잘리고 있자남~