首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库 | 站长工具
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>PHP教程>资讯:php实现Iframe无刷新上传

php实现Iframe无刷新上传

www.jz123.cn  2010-10-05   来源:   中国建站    责任编辑(袁袁)    我要投递新闻

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

<head>
<meta http-equiv="Content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="all" />
<title>使用Iframe无刷新上传</title>
<link rel="stylesheet" type="text/css" href="template/style.css" />
</head>
<body onload='iframe1.window.location="show_image.php"'>

<div id="header">AJAX无刷新上传演示</div>
<div id="des">
只允许上传格式为jpg,gif,png的图片,大小不超过1000K,上传后的图片会放在临时文件夹<br />
浏览器必须支持JavaScript和没有屏蔽Iframe,不然将看不到效果
</div>

<div id="mainform">
<form action="upload.php" method="post" enctype="multipart/form-data" name="upload_img" target="iframe1">
选择要上传的图片:<input type="file" name="image"><br />
<input type="submit" value="上传图片">
</form>
</div>

<div id="message" style="display:none" onclick="this.style.display='none'"></div>

<table id="maintable">
<tr>
<td colspan="2" id="title">临时文件夹中的全部图片</td>
</tr>
<tr>
<td>
<form method="post" name="delimage" action="del.php" target="iframe1">
<a href="#" onclick='javascript:document.delimage.submit();'>[删除所有图片]</a>
</form>
</td>
<td>
<form method="post" name="showimage" action="show_image.php" target="iframe1">
<a href="#" onclick="javascript:document.showimage.submit();">[刷新所有图片]</a>
</form>
</td>
</tr>
<tr>
<td colspan="2"><div id="show_image"></div></td>
</tr>
</table>

<br>
<iframe name="iframe1" width="0" height="0" scrolling="no"></iframe>
</body>
</html>

上一篇:PHP 如何使用文件锁 下一篇:PHP 如何显示客户端 IP 与服务器 IP

评论总数:0 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图