var codeStr = _g().getWidgetByName("code").getValue(); var newcode = codeStr.trim().replace(/\n/g, ","); var codeList = newcode.split(","); // .substring(0,newcode.length-1) var codeNum =null; if(codeList==null || codeList==''){ codeNum =0; }else{ codeNum =codeList.length; } //alert("个数:"+codeNum); //var value =_g().setCellValue("A11",codeNum); //_g().setCellValue("A11",codeNum); //示例1:延时赋值 setTimeout(function(){ var value = _g().setCellValue(0,0,12,"输入流水编号数: "+codeNum+" 条"); },50); //示例2:直接赋值 var value = _g().setCellValue(0,0,12,"输入流水编号数: "+codeNum+" 条"); |