http://logicalerror.seesaa.net/article/202927986.html(初心者用フォームスケルトン : ファイルアップロード)
@DIV
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>初心者用フォームスケルトン : SQL、メール、Twitter</title>
<script type="text/javascript">
function resetIframe() {
var ifdoc = document.getElementById("result").contentWindow.document;
ifdoc.write("");
ifdoc.close();
}
</script>
</head>
<body>
<div style='position:relative;padding:10px;'>
<span style='font-size:20px;'>初心者用フォームスケルトン</span>
<input
type="button"
value="結果をリセット"
onclick='resetIframe();'
style='position:relative;top:-3px;'
/>
<input
type="button"
value="ページリセット"
onclick='location="form.htm"'
style='position:relative;top:-3px;'
/>
<br><br>
<table style='width:100%'><tr>
<td style='width:1px;vertical-align:top;width:300px;'>
<form
enctype="multipart/form-data"
action="upload1.php"
method="POST"
target="result"
style='display:inline;'
>
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input
type="file"
id="file_1"
name="file_1"
size="40"
/>
<br>
<input
type="submit"
value="単フィールド単ファイルアップロード"
/>
<br />
<br />
</form>
<form
enctype="multipart/form-data"
action="upload2.php"
method="POST"
target="result"
style='display:inline;'
>
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input
type="file"
id="file_1"
name="file_1"
size="40"
/>
<br>
<input
type="file"
id="file_2"
name="file_2"
size="40"
/>
<br>
<input
type="submit"
value="複フィールド複ファイルアップロード"
/>
<br />
<br />
</form>
<form
enctype="multipart/form-data"
action="upload3.php"
method="POST"
target="result"
style='display:inline;'
>
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
multiple="true"<br>
<input
type="file"
id="file_1"
name="file_up[]"
size="40"
multiple="true"
/>
<br>
<input
type="submit"
value="単フィールド複ファイルアップロード"
/>
<br />
<br />
</form>
</td><td>
<iframe
id="result"
name="result"
frameborder="1"
scrolling="yes"
style='width:100%;height:700px;'
></iframe>
</td>
</tr>
</table>
</div>
</body>
</html>
@END |