I did that last year (as part of a longer trip).
Ljubljana-Zagreb for me (highly scenic) was part of an ÖBB e-ticket from Salzburg and Villach, and I stayed overnight in Zagreb (nice place).
Zagreb-Beograd I bought at the station when I arrived at Zagreb the evening before, at the local equivalent of €19.
When the Beograd train turned up from Ljubljana at about 1100 (with some sleepers from CH/AT), there was a lot of shunting and I'm not sure any of the stock which set off for Beograd actually arrived on the train from Ljubljana.
I think we set off with 5 coaches.
The long journey to Vinkovci was uneventful, slow in places, fast in others, but quite comfortable.
It's noticeable that the fast bits were the ones destroyed in the Balkan wars and since rebuilt to modern standards.
You can see in places across into Bosnia on the other side of the Sava from Croatia.
At Vinkovci there was another shunt, and I think they tried to reduce it to a single coach.
But as the passengers wouldn't fit, they let us back into a second coach.
On to the border between HR and SR, two lots of passport control, loco change, lots of police, not very friendly. It is an external EU border after all.
Then on to Beograd, quite a short journey, arriving about 1800.
It was hot, and there was a surprise visit en route (at Sremska Mitrovica I think) by a Serbian ice-cream seller, for which we were very grateful - the only refreshments available since Zagreb.
The scenery became steadily flatter and flatter south of Zagreb, with the final bridge over the Sava at Beograd, and the city itself, adding interest.
The locos used on both sides of the border were in the different national colours, but they were identical technically and both sported Zagreb maker's plates from the JŽ era.
Plenty of engineering work where the Zagreb-Beograd line meets the one from Novi Sad and Budapest, and the line onwards to Beograd has been upgraded (by the Russians).
We arrived at the old 1884 station in Beograd, which closed a week later. Trains now arrive at the new Centar station, but I can't tell you what that was like - not near the city centre though.
On arrival I booked a ticket to Budapest as that was my next destination - a very slow queue, but no problem in booking the ticket with a credit card.
That train was a 3-car loco-hauled service to Vienna ("Avala").
Local currency is a bit of a problem until you find an ATM, though they are quite happy to take euros at a poor rate.
The seat61 information is quite accurate for this trip, but I'd say be prepared for fairly run-down stock to ride in.