开发者

Function not working on Vista

开发者 https://www.devze.com 2022-12-17 19:42 出处:网络
I have this JavaScript function which is working in all the machines I tried except the one that is running on Vista. I am calling this function onload. what d开发者_Python百科o you think is wrong wit

I have this JavaScript function which is working in all the machines I tried except the one that is running on Vista. I am calling this function onload. what d开发者_Python百科o you think is wrong with this one.

function isePad() {
    var epad;
    epad = window.document.esCapture1.ConnectedDevice;

    if (!epad) {
        alert('Sorry epad either is not Connected or/and drivers are not installed');
    }
}


esCapture1 probably does not exist - You should check for it first:

function isePad() { 
    var epad; 
    if(window.document.esCapture1){
        epad = window.document.esCapture1.ConnectedDevice; 
    }

    if (!epad) { 
        alert('Sorry epad either is not Connected or/and drivers are not installed'); 
    } 
} 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号