The so-called “d
0” magnetism observed in semiconductors, which is not caused by partially filled d orbitals, has challenged our conventional understanding on the origin of magnetism. One class of semiconductor materials showing d
0 ferromagnetism is undoped oxides and nitrides. Here, we review the ferromagnetic properties of undoped GaN and MgO based on our recent investigations. It is revealed that the room-temperature ferromagnetism originates from the anion dangling bonds associated with the surface cation-vacancies. And the magnetism of ferromagnetic coupling between the vacancy induced local magnetic moment by through-bond spin polarization in undoped semiconductors is reviewed according to our works.