js变量undefined的判断

js变量undefined的判断

function adjustInputValue(loObj) {

var strDefValue = $("#" + loObj.id).attr("defValue");

if (typeof (strDefValue) == "undefined")

return true;

loObj.value = $.trim(loObj.value);

if (loObj.value == strDefValue) {

loObj.value = "";

} else if ($.zdcommon.isNull(loObj.value)) {

loObj.value = strDefValue;

}

猜你喜欢

转载自yuhuiblog6338999322098842.iteye.com/blog/2318892