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');
}
}
精彩评论