HTML served by ESP8266 -- dynamically show variable from server, without refresh

In my IDE, I have a global int variable called "status". This can change depending on user input, so it is not a static piece of data.

My ESP8266 serves a homepage, called page.html.

I would like to add a script to this page that retrieves the value of the variable and displays it as text, which is updated live without forcing a full refresh of the page.

I've looked online, but am having trouble parsing most of the solutions there, because they typically retrieve much more complicated data, and the code is made more confusing by the fact that the data is itself a response to some kind of physical input, like a sensor. So I am just asking for the text return, since I can use that as a module to do whatever.

Would anyone be able to provide me with a sample script? Thanks so much.

If you want to do this in HTML5, you will need to refresh at least a frame or portion of the page. You can do this in Javascript, and you can "serve" a JS file. Your question was the motivation behind AJAX. Just look up any number of AJAX tutorials, and one of the basic examples should be what you are looking for.