|
Q649 Can you detect if JavaScript is enabled on the users browser?
irt.org | Knowledge Base | JavaScript | General | Q649 [ previous next ]
Q649 Can you detect if JavaScript is enabled on the users browser?
Yes:
<script language="JavaScript"><!--
alert('This is a JavaScript enabled browser');
//--></script>
|
This isn't what I suspect you wanted to know. If you need to know on
the server, then you could add extra information to any:
Link:
<a href="apage.htm" onClick="this.href='apage.htm?JavaScript=enabled'">...</a>
|
CGI request:
<a href="cgi_program.pl" onClick="this.href='cgi_program.pl?JavaScript=enabled'">...</a>
|
Form:
<form name="myForm" action="whatever.htm">
<input name="JavaScript" value="" type="hidden">
</form>
<script language="JavaScript"><!--
document.myForm.JavaScript.value = 'enabled';
//--></script>
|
Feedback on 'Q649 Can you detect if JavaScript is enabled on the users browser?'
|
|
Copyright © 1996-2009 irt.org, All Rights Reserved.