Check Undefined in JavaScript
home
Run
screen_rotation
fullscreen
cloud_download
<html> <head> <title>Javascript Demo</title> <script type="text/javascript"> function checkUndefined() { if(typeof my_var === 'undefined' ){ alert("undefined variable"); } } </script> </head> <body> <a href="javascript:void(0)" onclick="checkUndefined()">Check </a> </body> </html>
<html> <head> <title>Javascript Demo</title> <script type="text/javascript"> function checkUndefined() { if(typeof my_var === 'undefined' ){ alert("undefined variable"); } } </script> </head> <body> <a href="javascript:void(0)" onclick="checkUndefined()">Check </a> </body> </html>
Copyrights@tutorialsplane.com