$.ajaxFileUpload(
{
url:’update.do?method=uploader’, //需要链接到服务器地址
secureuri:false,
fileElementId:’houseMaps’, //文件选择框的id属性
dataType: ‘xml’, //服务器返回的格式,可以是json
success: function (data, status) //相当于java中try语句块的用法
{
$(‘#result’).html(‘添加成功’);
},
error: function (data, status, e) //相当于java中catch语句块的用法
{
$(‘#result’).html(‘添加失败’);
}
}
);
}
</script>
</head>
<body>
<form method=”post” action=”update.do?method=uploader” enctype=”multipart/form-data”>










