Tuesday, August 12, 2014

check undefined variable in jquery

var id = decodeURIComponent(getQueryStringParameter("ID"));

    alert(id);
    if (id != 'undefined') {
        alert('success');
    }
    else {
        alert('fail');
    }

No comments:

Post a Comment