กราฟฟิค » สคริปเช็คคนเข้าเว็บไซต์ด้วยสมาร์ทโฟน และให้รีไดเร็ค ไปยังหน้าที่ต้องการ. TY

สคริปเช็คคนเข้าเว็บไซต์ด้วยสมาร์ทโฟน และให้รีไดเร็ค ไปยังหน้าที่ต้องการ. TY

3 มีนาคม 2018
1585   0


https://goo.gl/zTxtEo

<
script language=javascript>
<!--
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
location.replace("http://url-to-send-them/iphone.html");
}
-->
</script>

 

ขอบคุณคำแนะนำจาก https://www.hostatom.com

HostAtom Support <support@hostatom.com>

https://css-tricks.com/snippets/javascript/..