Switching from electromagnetically induced absorption grating to electromagnetically induced phase grating in a closed-loop atomic system.