Changing title script

i’m trying to make a simple music player for my website and want the name of the song playing to show up on the player, so basically i would just need it to show the name of the file playing without the .mp3 after it. anyone know how to do this?