标签:root app url sub fun roc func 图片 ext
<script>
$(‘.sub_btn‘).click(function(){
$(this).next().trigger(‘click‘);
})
$(document).on(‘change‘,‘#file‘,function(){
var form = new FormData();
var fileObj = $(this);
form.append(‘chat_image‘,fileObj[0].files[0]);
$.ajax({
type : ‘post‘,
url : "{:U(‘index/image‘)}",
data : form,
dataType : ‘json‘,
cache : false,
contentType : false,
processData : false,
success:function(msg)
{
heh = msg.replace(/"/g, "");
img = ‘<img src="__ROOT__‘+heh+‘" width="50">‘;
$(‘#message‘).append(img);
}
});
});
</script>
标签:root app url sub fun roc func 图片 ext
原文地址:http://www.cnblogs.com/wxzxc/p/7572705.html