like the following code,
how do I get the ("- sharpadd_img2") outside ajax () inside ajax (). Change () points to this???
ajax () inside console.log (this). The this output here points to ajax,
how do I make the this of this output point to ("- sharpadd_img2"). Change ()?
$("- sharpadd_img2") .change (function () {
console.log (this)
// , ajax
var formdata=new FormData();
var add_img2=this.files[0];
formdata.append("uploadImage",add_img2);
var str="1111";
formdata.append("recid",str);
var title="";
formdata.append("title",str);
$.ajax({
url:"/imageText/saveImage.do",
type:"post",
contentType:false,
data:formdata,
// data:{"title":title,"uploadImage":uploadImage},
processData:false,
success:function(info){
console.log(info);
// img
this.siblings(".this_show_img").attr("src",info)
console.log(this)
},
error:function(err){
console.log(err);
}
});
})