Dust extinction of the stellar continua in starburst galaxies: The ultraviolet and optical extinction law