Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get screen width

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = "Total Width: " + screen.width + "px";
  document.getElementById("demo").innerHTML = x;
}
</script>
 
PREVIOUS NEXT
Tagged: #php #screen #width
ADD COMMENT
Topic
Name
5+7 =