I think you might be confusing javascript and java. However, on the off chance you did actually mean Java, you need to write some Java to query LFSW via the pubstats.
This thread details the various formats that LFSW pubstats can output. You then write java to parse this.
It cannot be done in pure javascript without some server side stuff behind it. Either someone will need to write one for you and host it, or you'll need to get access to a host where you can run server side scripting. Or you'll have to rely on the buttons provided by the LFS team, which show whether or not a user is online, and can be integrated straight into a static HTML based page.
However, if you don't understand HTML, even the basics of it, you're going to struggle and I'd suggest getting someone to help you.