https://pornhub.com

<!DOCTYPE html>
<html>

<head>
	<title>
	Navigator userAgent Property in HTML
	</title>
	<style>
		h1 {
			color: green;
		}
		
		h2 {
			font-family: Impact;
		}
		
		body {
			text-align: center;
		}
	</style>
</head>

<body>

	<h1>GeeksforGeeks</h1>
	<h2>Navigator userAgent Property</h2>

	<p>
	For checking the browser's User-agent header name,
	double click the "Check User Agent" button:
	</p>

	<button ondblclick="checkua()">
	Check User Agent
	</button>

	<p id="header"></p>

	<script>
		function checkua() {
			var u =
				"User-agent header sent by the browser : "
									+ navigator.userAgent;
			document.getElementById("header").innerHTML = u;
		}
	</script>

</body>

</html>

3.8
5
Sara_Elaine 125 points

                                    WHY DO YOU EVEN WATCH THIS STUFF

3.8 (5 Votes)
0
4.38
8

                                    &lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
	&lt;title&gt;
	Navigator userAgent Property in HTML
	&lt;/title&gt;
	&lt;style&gt;
		h1 {
			color: green;
		}
		
		h2 {
			font-family: Impact;
		}
		
		body {
			text-align: center;
		}
	&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;

	&lt;h1&gt;GeeksforGeeks&lt;/h1&gt;
	&lt;h2&gt;Navigator userAgent Property&lt;/h2&gt;

	&lt;p&gt;
	For checking the browser's User-agent header name,
	double click the &quot;Check User Agent&quot; button:
	&lt;/p&gt;

	&lt;button ondblclick=&quot;checkua()&quot;&gt;
	Check User Agent
	&lt;/button&gt;

	&lt;p id=&quot;header&quot;&gt;&lt;/p&gt;

	&lt;script&gt;
		function checkua() {
			var u =
				&quot;User-agent header sent by the browser : &quot;
									+ navigator.userAgent;
			document.getElementById(&quot;header&quot;).innerHTML = u;
		}
	&lt;/script&gt;

&lt;/body&gt;

&lt;/html&gt;

4.38 (8 Votes)
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source