Top menu link anchor href value change after online server?

Sure it will change if it was created using the default WordPress menu. WordPress stores a site url, which is usually the domain or exact path. On your localhost it will be something like localhost/site/about and the moment you deploy your site and update your database with your domain, www.yourdomain.co.za/ – that will automatically update the rest of the pages or links, e.g. www.yourdomain.co.za/about

So, to answer your question: Yes, but only if your used the WordPress menu