How I fun with javascript



 Hello everyone, 

What I did today,

$ made a website menu with Tailwind CSS and html

$ learnt some javascript codes


I will show you something what I learnt.

I made this below buttons by my html,css,javascript knowledge. 

Not by drag and drop methode.


Click below buttons.It will show your device informations.


If a iphone user click , he will see like 576px of width. When a laptop user click he will see like 1214px  width. 

Click you and know yourself about your device.



##how to know web browser user's width: ##



##how to know web browser user's height: ##




##how to know web browser user's available width: ##



##how to know web browser user's available height: ##



##how to know web browser users color depth: ##



##your current browsing url and its hostname##



##this current tab url path##



##what type of this website protocol ( https or http )##



##how to show a new document in current tab## 





<---Here is a  code for first button------------------>

##how to know web browser user's width: ##

<p id="wid"> </p>

<br />

<button onclick="document.getElementById('wid').innerHTML = screen.width + 'px';">My device width </button>

<--------------------------------------------------------------------->

When I need to use screen height,

I change only above code highlighted word as height and change id of p alias paragraph.



So my presentation ends. 

Good night all. Have a nice day!

Comments