Using 7.93 fb−1 of e+e− collision data collected at the center-of-mass energy of 3.773 GeV with the BESIII detector, we measure the absolute branching fractions of D0→K−e+νe, D0→K−μ+νμ, D+→Kˉ0e+νe, and D+→Kˉ0μ+νμ to be (3.521±0.009stat.±0.016syst.)%, (3.419±0.011stat.±0.016syst.)%, (8.864±0.039stat.±0.082syst.)%, and (8.665±0.046stat.±0.084syst.)%, respectively. By performing a simultaneous fit to the partial decay rates of these four decays, the product of the hadronic form factor f+K(0) and the modulus of the c→s CKM matrix element ∣Vcs∣ is determined to be f+K(0)∣Vcs∣=0.7171±0.0011stat.±0.0013syst.. Taking the value of ∣Vcs∣=0.97349±0.00016 from the standard model global fit or that of f+K(0)=0.7452±0.0031 from the LQCD calculation as input, we derive the results f+K(0)=0.7366±0.0011stat.±0.0013syst. and ∣Vcs∣=0.9623±0.0015stat.±0.0017syst.±0.0040LQCD.