javascript - how can I test logic under the condition of "'ontouchstart' in window" in JS -


we have logic under "ontouchstart in window". use popup form desktop website, rest of cases show normal form.

 var isdesktopdevice = !('ontouchstart' in window);   if (isdesktopdevice) {         //popup form  } else {         //normal form  } 

i wonder how can test in javascript

many in advance


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

html - href attribute breaking an element -