Play video content EXCLUSIVE TMZSports.com

Denver Broncos legend John Elway was back in L.A. Wednesday night -- and kinda sorta pledged to donate his brain to science ... if he was actually being serious.

Elway was leaving Craig's in West Hollywood when we told him about fellow NFL Hall of Famer Warren Sapp, who announced Tuesday he'll be donating his brain for concussion research.

Elway's reaction: "Okay, I'll donate mine too."

It would be huge for a high profile NFL star like Elway -- who also runs the Broncos -- to actually pledge his brain to a CTE study ... but when you watch the clip, it doesn't seem like he's too serious about it.