private_old.js
上传用户:lwb168
上传日期:2021-10-31
资源大小:722k
文件大小:1k
源码类别:

Email服务器

开发平台:

ASP/ASPX

  1. // 去空格,left,right,all可选
  2. function BaseTrim(str){
  3.   lIdx=0;rIdx=str.length;
  4.   if (BaseTrim.arguments.length==2)
  5.     act=BaseTrim.arguments[1].toLowerCase()
  6.   else
  7.     act="all"
  8.       for(var i=0;i<str.length;i++){
  9.    thelStr=str.substring(lIdx,lIdx+1)
  10. therStr=str.substring(rIdx,rIdx-1)
  11.         if ((act=="all" || act=="left") && thelStr==" "){
  12. lIdx++
  13.         }
  14.         if ((act=="all" || act=="right") && therStr==" "){
  15. rIdx--
  16.         }
  17.       }
  18.   str=str.slice(lIdx,rIdx)
  19.       return str
  20. }
  21. // 基本信息提示,得到焦点并选定
  22. function BaseAlert(theText,notice){
  23. alert(notice);
  24. theText.focus();
  25. theText.select();
  26. return false;
  27. }