Owing to the layered geometry and the thickness-dependent bandgap, two-dimensional (2D) layered transition metal dichalcogenides (TMDCs) exhibit unique nonlinear optical (NLO) features and have becoming intriguing and promising candidate materials for photonic and optoelectronic devices with high performance and unique functions. We have extensively investigated the layer number dependent nonlinear absorption and nonlinear refractive index of monolayer and few-layer transition metal dichalcogenides (i.e., WS2, MoS2, etc.) over broad wavelength (Vis-NIR) range. Distinct NLO responses were demonstrated that multilayer films showed saturable absorption effect, and monolayer films exhibited remarkable two-photon absorption (TPA) effect. The giant nonlinearity of WS2 and MoS2 films was ascribed to the 2D confinement, giant exciton effect and the band-edge resonance of TPA. Importantly, we show that two-photon excitation can be used to probe the movement of dark excitonic state and band-edge in layered MoS2. The nonlinear refractive index of WS2 and WSe2 semiconductor films have been characterized by using Z-scan technique with fs pulses at the wavelength of 1040 nm. There exists a dispersion of nonlinear refractive index in the WS2 films that translated from positive in the monolayer to negative in the bulk. These works have make foundations for the potentials 2D semiconductor based nonlinear photonic devices, such as optical switch, mode-locker, optical limiter, optical diode, etc.