yueyuecoding

function checkKey(key) {
  if($.trim(key) == \'\'){
    /**
     * 输入的字符串为空,空格
     */
    alert(\'请输入关键字\');
    return false;
  }else{
    /**
     * 输入的字符串为
     */
    return true;
  }
}

 

$.trim(key)   相当于python3中的str.strip()

 

转自:https://www.cnblogs.com/handsomeBoys/p/6767459.html

分类:

技术点:

相关文章:

  • 2022-01-01
  • 2021-12-04
  • 2022-12-23
  • 2021-12-04
  • 2022-02-10
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案