⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ajaxfileupload.php

📁 jquery写的文件上传工具
💻 PHP
字号:
<html>	<head>		<title>Ajax File Uploader Plugin For Jquery</title><link href="ajaxfileupload.css" type="text/css" rel="stylesheet">	<script type="text/javascript" src="jquery.js"></script>	<script type="text/javascript" src="ajaxfileupload.js"></script>	<script type="text/javascript">	function ajaxFileUpload()	{		$("#loading")		.ajaxStart(function(){			$(this).show();		})		.ajaxComplete(function(){			$(this).hide();		});		$.ajaxFileUpload		(			{				url:'doajaxfileupload.php',				secureuri:false,				fileElementId:'fileToUpload',				dataType: 'json',				success: function (data, status)				{					if(typeof(data.error) != 'undefined')					{						if(data.error != '')						{							alert(data.error);						}else						{							alert(data.msg);						}					}				},				error: function (data, status, e)				{					alert(e);				}			}		)				return false;	}	</script>		</head>	<body><div id="wrapper">    <div id="content">    	<h1>Ajax File Upload Demo</h1>    	<p>Jquery File Upload Plugin  - upload your files with only one input field</p>				<p>				need any Web-based Information System?<br> Please <a href="http://www.phpletter.com/">Contact Us</a><br>				We are specialized in <br>				<ul>					<li>Website Design</li>					<li>Survey System Creation</li>					<li>E-commerce Site Development</li>				</ul>    			<img id="loading" src="loading.gif" style="display:none;">		<form name="form" action="" method="POST" enctype="multipart/form-data">		<table cellpadding="0" cellspacing="0" class="tableForm">		<thead>			<tr>				<th>Please select a file and click Upload button</th>			</tr>		</thead>		<tbody>				<tr>				<td><input id="fileToUpload" type="file" size="45" name="fileToUpload" class="input"></td>			</tr>		</tbody>			<tfoot>				<tr>					<td><button class="button" id="buttonUpload" onclick="return ajaxFileUpload();">Upload</button></td>				</tr>			</tfoot>		</table>		</form>    	    </div>    	</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -