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?
Add a comment
|
1 Answer
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.