我想在 ajax:success 上重新加载一个特定的div,但它正在重新加载该div中的整个页面
$.ajax({
type: "GET",
url: "http://192.168.2.210/sciAuthor1/personaldetails/cropImage",
cache: false,
success: function (response) {
parsed = $.parseJSON(response);
var path = "http://192.168.2.210/sciAuthor1/img/upload/" + parsed;
$('#up_img').load('http://192.168.2.210/sciAuthor1/user/profile/1'+ '#up_img');
$edit_dialog.dialog('close');
}
});
我想重新加载的div
<div class="txtc" id="up_img">
<?php
$img_path = Commonfunctions::ProfileImage();
echo $this->tag->image(array('id'=>"profile_image",$img_path,"class"=>"profile_img")) ;
?>
</div>
运行此代码后,它将重新加载#up_img中的完整页面。
答案 0 :(得分:3)
$('#up_img').load(url + '#div_you_want_to_get');