<html> <body> <button onclick="alert(screen.width + 'x' + screen.height);"> Screen resolution </button> </body> </html>