Comic songs were always a staple of the musical stage. For example, "Der Deitcher's Dog," by Septimus Winner (author of "Listen to the Mocking Bird") from around 1845. One verse still is known, but the original was a "stage German" song. And old Sep even created an answer song (remember those?) in which he allowed as how sausages must be made from dog meat, since the singer ate a sausage last week and he's still barking.
So novelty songs came from the earliest days of American musical theater, for sure, and have a long history. The name "novelty song" goes back for sure to the early days of 78-rpm recordings ("Clancy's Wooden Wedding" and other hits), and may even go further back to billings in vaudeville (those placards with the artist's name they put on the easel on stage probably said, "Eddy Foy / Novelty Songs and Patter" or something similar).
To me, not all funny or comic songs are automatically "novelty" songs, and some listed above wouldn't be in my list. But I do like 'em, for sure. And, except for Weird Al's parodies, you don't hear very many on the air or on CD. Too bad.