We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

priyanhere on 11/14/06


Tagged

empty validation javscript


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

kyokutyo
shachi


Javascript Validation - isEmpty()


Published in: JavaScript 


URL: http://www.freebookzone.com

  1. function isEmpty( inputStr ) { if ( null == inputStr || "" == inputStr ) { return true; } return false; }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: kyokutyo on November 19, 2006
Posted By: badkungfu on February 27, 2007

function isEmpty( inputStr ) { return ( null == inputStr || "" == inputStr ) }

Posted By: badkungfu on February 27, 2007

function isEmpty( inputStr ) { return !(inputStr&&inputStr.length) }

You need to login to post a comment.