jQuery - Utilities实用工具 - trim去掉字符串前后的空格
[trim去掉字符串前后的空格示例]
<html>
<head>
<script src="jquery-1.2.js"></script>
<script>
var str = " lots of spaces before and after ";
alert("'" + str + "'");
str = $.trim(str);
alert("'" + str + "' - no longer");
</script>
</head>
</html>
[trim去掉字符串前后的空格文档]
http://docs.jquery.com/Utilities/jQuery.trim
[jQuery官方网站]
http://jquery.com/[jQuery当前版本]
http://docs.jquery.com/Release:jQuery_1.2[jQuery其他下载地址]
下载列表, http://docs.jquery.com/Downloading_jQuery最新代码, http://code.jquery.com/nightlies/jquery-nightly.js
[jQuery相关论坛]
http://groups.google.com/group/jquery-enhttp://WebDev.board.newsmth.net/
http://WebGeeks.board.newsmth.net/
http://bbs.pku.edu.cn/, homepage看版
http://forum.csdn.net/SList/JavaScript/
[jQuery关键词]
jQuery[jQuery - Core核心]
each迭代, http://docs.jquery.com/Core/each[jQuery的Ajax]
jQuery的Ajax文档, http://docs.jquery.com/Ajax/jQuery.ajaxjQuery的Ajax选项,http://docs.jquery.com/Ajax/jQuery.ajax#options
dataType选项,设置返回值类型
timeout选项,用于设置超时
与PHP集成可以使用json_encode返回结果, http://www.php.net/manual/zh/function.json-encode.php
[jQuery特效]
jQuery淡入特效,http://docs.jquery.com/Effects/fadeIn
[jQuery - Selectors选择器]
表单元素选择器, http://docs.jquery.com/DOM/Traversing/Selectors#Form_Selectors属性相等选择器,http://docs.jquery.com/Selectors/attributeEquals
checked选中, http://docs.jquery.com/Selectors/checked
选择器在选择body中出现的title标记时,会出现和预期不同的效果。
[jQuery常用函数]
attr访问自定义属性,减少javascript脚本中代码和数据的耦合
click, 绑定元素的onclick事件,http://docs.jquery.com/Events/click
filter, 用于在集合中过滤元素
click, 绑定元素的onclick事件,http://docs.jquery.com/Events/click
[jQuery - Events事件]
hover, http://docs.jquery.com/Events/hoversubmit提交, http://docs.jquery.com/Events/submit
[jQuery - Traversing遍历器]
filter过滤, http://docs.jquery.com/Traversing/filterfind查找, http://docs.jquery.com/Traversing/find
[jQuery - Tutorials教程]
Introducing $(document).ready(), http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready%28%29[jQuery - plugins插件]
Easing动画, http://jquery.com/plugins/project/easingjCarouseLite, 走马灯效果, http://jquery.com/plugins/project/jCarouselLite
tableFilter, 表过滤器, http://jquery.com/plugins/project/tableFilter
[jQuery - Utilities实用工具]
trim去掉字符串前后的空格, http://docs.jquery.com/Utilities/jQuery.trim[jQuery重要工具]
http://www.json.org/, http://www.json.org/json.js[jQuery - 综合实例]
实现前一个和后一个效果再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow