编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
jQuery API 开发手册

返回值:StringjQuery.trim(str)

概述

去掉字符串起始和结尾的空格。

参数

strStringV1.0

需要处理的字符串

示例

描述:

去掉字符串起始和结尾的空格。

jQuery 代码:
$.trim("  hello, how are you?  ");
结果:
"hello, how are you?"
相关文章
jquery mobile collapsible set动态创建显示的方法jquery easyui filebox 文件框 jquery easyui progressbar 进度条 jquery easyui datebox 日期输入框 jquery easyui editable datagrid 可编辑表格 animated jquerycallbacks.add callbacks jqueryclearqueue queuename jquerydeferred.notifywith context args jquery disabled jqueryevent.ispropagationstopped jqueryfadetoggle speed easing fn jquery header jqueryis expr|obj|ele|fn jqueryjquery.get url data callback type jqueryjquery.noop jqueryjquery.trim str jquerykeypress data fn jquerymouseover data fn jqueryjquery $.trim str
关注编程学问公众号
编程学问网 湘ICP备20001732号