/**
 * Created by kogting on 14-6-20.
 */
$(function(){
    function upload(){
        var obj = $(this);
        var data = obj.parent.find("input[type=file]").file;
        alert(data);
        $.ajax({
            type:'post',
            url:'',
            data:data,
            error:function(request){
                alert("上传失败");
            },
            success:function(data){
                obj.parent.find("input[class=hidden]").value(data);
            }
        });
    }
});(jQuery);