没有合适的资源?快使用搜索试试~ 我知道了~
javascript的trim和日期时间格式化函数
5星 · 超过95%的资源 需积分: 49 5 下载量 60 浏览量
2010-01-11
10:07:53
上传
评论
收藏 1KB TXT 举报
温馨提示
试读
2页
javascript的TRIM函数和日期时间格式化函数 如 var d = new Date().format('yyyy-MM-dd hh:mm:ss');
资源推荐
资源详情
资源评论
<SCRIPT LANGUAGE="JavaScript">
<!--
//出处:网上搜集
//made by yaosansi 2005-12-02
//For more visit http://www.yaosansi.com
// Trim() , Ltrim() , RTrim()
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.RTrim = function()
{
return this.replace(/(\s*$)/g, "");
}
//-->
</SCRIPT>
Date.prototype.format = function(format)
{
var o = {
"M+" : this.getMonth()+1, //month
<!--
//出处:网上搜集
//made by yaosansi 2005-12-02
//For more visit http://www.yaosansi.com
// Trim() , Ltrim() , RTrim()
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.RTrim = function()
{
return this.replace(/(\s*$)/g, "");
}
//-->
</SCRIPT>
Date.prototype.format = function(format)
{
var o = {
"M+" : this.getMonth()+1, //month
资源评论
- o201208312013-07-25好用解决问题了
likinliang
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功