Javascript examples for Language Basics:Introduction
detect if browser supports CSS3 media query
<html lang="en"> <head> <title>Are media querries supported?</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w ww . jav a 2 s. c o m*/ if(typeof window.matchMedia != "undefined" || typeof window.msMatchMedia != "undefined") { console.log("media querries are supported!"); }else{ console.log("no media query support"); } } </script> </head> <body> </body> </html>