Thursday, 18 November 2021

LAB JAVASCRIPT - Dò độ phân giải - if (screen.width==800) document.location='index1.html';

Untitled Document //Code

Dò độ phân giải để chuyển cho user trang web thích hợp với độ phân giải của họ
<script type="text/javascript">
if (screen.width==800) document.location='index1.html';
else if (screen.width==1024) document.location='index2.html';
else document.location='index3.html';
</script>

0 comments:

Post a Comment