var incontext = '';
                                $.ajax({
                                    url:'index.php?act=load&parid='+classid+'&t='+Math.random(),
                                    dataType:'json',
                                    error:function(){
                                        alert('载入错误');
                                    },
                                    success:function(d){
                                        
                                        for(n=0;n<d.length;n++){
                                            switch(d[n].type){        
                                                case '1'://文字
                                                    incontext += '<li><span>喜欢<strong>5</strong>评论<strong>4</strong></span><img src="images/s_text_icon.png" /><a href="index.php?act=post&parid='+classid+'">我的故事</a></li>';
                                                   
                                                    break;
                                                case '4'://图片  
                                                    break;
                                                case '2'://音乐
                                                    break;
                                                case '3'://视频   
                                                default://分类
                                            }
                                        }
                                    } 
                                }); alert(incontext);
incontext的作用域咋全局,这样alert出来还是空的
如何给incontext定义