Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<script src="https://www.w3schools.com/lib/w3.js "></script>
<body>
<div id="mydiv">
{{device}}
</div>
<script>
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
if (screen.width <= 768) {
var myObject= {"device" : "mobile device"};
}
else
{
var myObject= {"device" : "tablet"};
}
}
else
{
var myObject= {"device" : "desktop"};
}
w3.displayObject("mydiv", myObject);
</script>
</body>
</html>
The most helpful W3.JS solutions
How to fill a dropdown using w3.js ?W3.JS
Click to see more ...
1.3K
147
how to fill a dropdown from another file using w3.js ?W3.JS
Click to see more ...
1K
144
how to fill a table from another file using w3.js ?W3.JS
Click to see more ...
715
71
How to change background color using w3.js ?W3.JS
Click to see more ...
576
57
get latitude and longitude w3.jsW3.JS
Click to see more ...
575
56
how to fill a list from another file using w3.js ?W3.JS
Click to see more ...
523
53
how to set background color using w3js ?W3.JS
Click to see more ...
425
49
How to make a slide show using w3.js ?W3.JS
Click to see more ...
417
46
How to display text in html element using w3.js ?W3.JS
Click to see more ...
364
42
how to round numbers to decimals from another file and display it using w3.js ?W3.JS
Click to see more ...
426
28