Wednesday, 17 February 2016

Re: JavaScript status indicator - request for a snippet of code

John Williams wrote


> Can anyone who understands JS provide a snippet of JS code that I can
> insert in the footer of my local HTML index page to conditionally print,
> say, "JavaScript is enabled!" as a reminder of NetSurf's current JS status.

> If anyone wants to "go the whole hog" and reflect the two possible states,
> then my local index page¹ uses PHP served by WebJames, but that is by no
> means essential and may well be over-complicated.

> I suspect that what I require is very simple/trivial and can be done in one
> line of JS.


try this:

<script> document.write("javascript is enabled"); </script>

John


--
John Rickman - http://rickman.orpheusweb.co.uk/lynx
Doth not even nature itself teach you, that, if a man have long hair,
it is a shame unto him? Saint Paul KJ

No comments:

Post a Comment