Line 273: | Line 273: | ||
return flag; | return flag; | ||
} | } | ||
− | + | function IsPC(){ | |
+ | var userAgentInfo = navigator.userAgent; | ||
+ | var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); | ||
+ | var flag = true; | ||
+ | for (var v = 0; v < Agents.length; v++) { | ||
+ | if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } | ||
+ | } | ||
+ | return flag; | ||
+ | } | ||
+ | var oDrop=document.getElementsByTagName(".dropdown"); | ||
+ | if(!IsPC()){ | ||
+ | oDrop.addEventListener("touchstart", function(e){ | ||
+ | e.preventDefault(); | ||
+ | }); | ||
+ | } | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 08:26, 20 October 2019