Pages

Wednesday, May 29, 2013

Find if variable exists or defined in javascript

For example

if(typeof selected_val === 'undefined')
{
 alert('Variable selected_val does not exist');
}

No comments: