摘要:
/**判断字符串的UTF8长度**/functiongetulength(str){varc,b=0,l=str.length;while(l){c=str.charCodeAt(--l);b+=(c<128)?1:((c<2048)?2:((c<65536)?3:4));};returnb;} 阅读全文
摘要:
function getDate(format){ //获得当前系统的时间 var myDate = new Date(); var year = myDate.getYear()+""; //获取当前年份 var fullyear = myDate.getFullYear().toString(); //获取完整的年份(4位,1970) var Month = myDate.getMonth()+1; //获取当前月份(0-11,0代表1月) var NowDate = myDate.getDate(); //获取当前日(1-31) var hours = myDate. 阅读全文
摘要:
businessObj.loadXMLString=function(xmlString,callback,parameter){varxml=newActiveXObject("Microsoft.XMLDOM");xml.onreadystatechange=xmlRead;xml.async=false;functionxmlRead(){if(xml.readyState==4){if(callback){if(parameter){callback.apply(xml,parameter);}else{callback.apply(xml);}}}}xml.loa 阅读全文