dimanche 8 février 2015

How to use javascript to add or take content away from mobile / desktop

Hi guys basically what I want to do is display some html code if the user if on a desktop/laptop and if not display different data here is my code (Thanks in advanced)



<script type="text/javascript">
if (screen.width <= 800) {
<html>
<p>You are on desktop , or a really big screen!</p>
</html>
}
</script>




Aucun commentaire:

Enregistrer un commentaire