1

A client web browser has JavaScript enabled, but I want to emulate the state where JavaScript is disabled to run code within noscript tags. For example: on the site is a button - "No JavaScript". When the client clicks the button, the code within nonscript tags will execute. Is it possible?

0

1 Answer 1

1

You can not control whether the user has JavaScript enabled in their browser or not, so although you could potentially throw a JavaScript error to maybe stop execution (see: Is it possible to stop JavaScript execution?) you won't be able to disable it and cause the noscript tag content to display without disabling JavaScript in your browser.

Not the answer you're looking for? Browse other questions tagged or ask your own question.