I use javascript & jquery in my web page which is out of the scope of this forum. google
as far as getting the value from OpenHAB you have two choices, write a little script to get it from the REST api or the REST api is also capable of sending server side events