We examine the ionospheric F2-layer electron density variation by solar activity in middle latitude by using foF2 observed at the Kokubunji ionosonde station in Japan for the period from 1997 to 2008. The semi-annual variation of foF2 shows obviously in high solar activity (2000-2002) than low solar activity (2006-2008). It seems that variation of geomagnetic activity by solar activity influences on the semi-annual variation of the ionospheric F2-layer electron density. According to the Lomb-Scargle periodogram analysis of foF2 and Ap index, interplanetary magnetic field (IMF) Bs (IMF Bz