//var str = null;
var str ='';
alert(isNull(str));
/**
* if a str is space or null return true
* esle return false;
*/
function isNull(str) {
if(!str){//when str = '', it's false
return true;
}
if (str.length > 0) {
return false;
} else {
return true;
}
}
Smilar Posts of js Tips
-
javascript package
When I see other people's js framework that can be var gmarket = new GMarket (); I feel very strange, how so, like java! Gmarket and in the use of the time, gmarket.getLog (), I would very much wa ...
-
js commonly used in integrated
/ / Open the model dialog box function doSelectUser (txtId) ( strFeatures = "dialogWidth = 500px; dialogHeight = 360px; center = yes; middle = yes; help = no; status = no; scroll = no"; var ...
-
rails provinces cascade implementation
Page code is as follows: Provinces in the list box: City list box: js: action in the code are as follows:
-
Javascript in the browser environment (seven) XMLHttpRequest
XMLHttpRequest XMLHttpRequest is a function used to create a http request. XHR initial IE through ActiveX objects are realized. After the beginning of the various browsers support. Now AJAX is the pop ...
-
javascript built-in functions Info
48. In the old browsers do not perform this JS :<!-- //--> 49. To quote a document-style JS: <script type="text/javascript" src="/blog/aaa.js"> </ script> 50. Spe ...
-
SUI-JavaScript rich UI library integration solution
Introduction: SUI is not a class implementation of the UI, nor is it a standard set of UI markup language, it is just to help the existing UI frameworks (such as Ext, YUI like) to mark the way to the ...
-
Msxml2.XMLHTTP version problem
Projects with an import feature prototype.js of Ajax functionality to update the prompt, the code is very simple, do not have the framework of the background on a jsp to output Text, future use of tim ...
-
JS after ajax request return of the problem can not be implemented
1: Send ajax request, in the onComplete, if back when the html contains a javascript, then these javascrip and will not be realized, it does not mean not to implement. This problem has troubled me for ...
-
Use Ext JS to read the JsonReader complex object json
Today was how to resolve the following complex json object to the difficult living over a long time .. did not find documentation how to read JsonReader Ways json object (possibly also because of thei ...
-
Struts2 + hibernate + spring problem user log in
dao layer services layer action jsp user name: Password:







