An in vivo method to test gene function in postnatal brain is described. Recombinant AAVs expressing Cre and/or a fluorescent protein are injected into neonatal mouse brain. Mosaic gene inactivation and sparse neuronal labeling are achieved, allowing rapid analysis of gene function in processes critical to neural circuit development.