How to get “raw” href contents in JavaScript March 20, 2023 by Tarik Try the getAttribute method instead.