<td style="text-align:center;width:200px">
<img src="images/title1.jpg" id="imsSpeIllnessEditForm_img" style="width:172px;height:98px">
<div>
<input type="hidden" id="imsSpeIllnessEditForm_img_url" name="image">
<input type="file" id="coreSpeIllnessEditForm_img_upload" onchange="imgSpeHospitalUploadReg();" name="imgUpload" style="width:180px;"/>
</div>
</td>
function imgSpeHospitalUploadReg(){
var isOk = detection('coreSpeIllnessEditForm_img_upload');
if(isOk){
jQuery.ajaxFileUpload({
url:"url",
secureuri:false,
async:false,
fileElementId:'coreSpeIllnessEditForm_img_upload',
dataType: 'json',
success:function(res){
$("#imsSpeIllnessEditForm_img").attr("src",_basePath+"/"+res.result.imgUpload);
$("#imsSpeIllnessEditForm_img_url").val(_basePath+"/"+res.result.imgUpload);
}
});
}else{
$.messager.alert('提示', '请选择图片格式的文件!', 'warning');
file.after(file.clone().val(""));
file.remove();
}
}