ウインドウ位置指定
ウインドウ位置指定
<html>
<head>
<script type="text/javascript" language="javascript" >
//ウインドウを最大化
function confirmPage()
{
strData1 = document.frm1.txt1.value;
strData2 = document.frm1.txt2.value;
strData3 = document.frm1.txt3.value;
if(strData1 != "")
{
strData1 += "様";
}
else
{
strData1 = "お名前を入力してください。";
}
html = "";
html += "<html>";
html += "<body>";
html += "送付先<br />";
html += "<br />";
html += "お名前<br />";
html += strData1 + "<br />";
html += "<br />";
html += "住所<br />";
html += strData2 + "<br />";
html += "<br />";
html += "電話番号<br />";
html += strData3 + "<br />";
html += "<br />";
html += "</body>";
html += "</html>";
obj = window.open("",
"",
"toolbar = 0, location = 0, directories = 0, status = 0, menubar = 0, scrollbars = 0, resizable = 0, width = 300, height = 300");
obj.document.open();
obj.document.write(html);
obj.document.close();
//ウインドウを最大化
if(screen)
{
obj.moveTo(300, 300);
}
}
</script>
</head>
<body>
<form name=frm1 id=frm1 method="POST">
<label style="background-color:darkblue;color:white;text-align:center;width:150px;">名 前</label>
<input type = text id=txt1 nama=txt1 value = "" /><br />
<label style="background-color:darkblue;color:white;text-align:center;width:500px;">住 所</label>
<input type = text id=txt2 nama=txt2 value = "" /><br />
<label style="background-color:darkblue;color:white;text-align:center;width:200px;">電話番号</label>
<input type = text id=txt3 nama=txt3 value = "" /><br />
<input type = "button" value = "確認" onClick = "confirmPage();">
</form>
</body>
</html>
|
|