The mechanical properties and dissipation behaviors of nanometers confined liquid films have been long-standing interests in surface force measurements. The correlation between the contact stiffness and damping of the nanoconfined film is still not well understood. We establish a novel computational framework through molecular dynamics (MD) simulation for the first time to study small-amplitude dynamic atomic force microscopy (dynamic AFM) in a simple nonpolar liquid. Through introducing a tip driven dynamics to mimic the mechanical oscillations of the dynamic AFM tip-cantilever assembly, we find that the contact stiffness and damping of the confined film exhibit distinct oscillations within 6-7 monolayer distances, and they are generally out-of-phase. For the solid-like film with integer monolayer thickness, further compression of the film before layering transition leads to higher stiffness and lower damping, while much lower stiffness and higher damping occur at non-integer monolayer distances. These two alternating mechanisms dominate the mechanical properties and dissipation behaviors of simple liquid films under cyclic elastic compression and inelastic squeeze-out. Our MD simulations provide a direct picture of correlations between the structural property, mechanical stiffness, and dissipation behavior of the nanoconfined film.