单项选择题

获取浏览器客户端的userAgent,以下方法正确的是?()

A.window.userAgent
B.history.userAgent
C.document.userAgent
D.navigator.userAgent