<!DOCTYPE html>
<html lang="CN">
<head>
	<title>upload model</title>
	<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.form.js"></script>
</head>
<body>
    <label>Filename:</label>
    <form >
		<input type="file" name="file"  /> 
		<input type="button" value="Upload" name="button" ></button>
    </form>

	<script type="text/javascript">
	    $(document).ready(function () {
	    	var options = {
	    		success: function (data) {
	    			$("#responseText").text(data)  //responseTest没实际意义
	    		}
	    	};
	    	$("#button").click(function () {
	    		$("#form").ajaxSubmit(options);
	    	});
	    });
	</script>
</body>
</html>

 注意,Jquery最低版本为v1.5

参考:http://www.cnblogs.com/heyuquan/p/form-plug-async-submit.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-06-16
  • 2021-06-20
  • 2021-05-18
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2022-03-10
  • 2021-11-09
  • 2021-12-27
  • 2021-06-19
  • 2021-06-14
相关资源
相似解决方案