js操作cookies

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function setCookie(name, value) {
    var Days = 30;
    var exp = new Date(); //new Date(“December 31, 9998″);
    exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
    document.cookie = name +=+ escape(value) +;
    expires =+ exp.toGMTString();
}
function getCookie(name) {
    var arr, reg = new RegExp(( ^ |)+ name += ([ ^ ;] * )(; | $));
    if (arr = document.cookie.match(reg)) return unescape(arr[2]);
    else return null;
}
function delCookie(name) {
    var exp = new Date();
    exp.setTime(exp.getTime()1);
    var cval = getCookie(name);
    if (cval != null) document.cookie = name +=+ cval +;
    expires =+ exp.toGMTString();
}
Posted in javascript | Tagged , | Leave a comment

在JS中实现日期相加

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
function DateAdd(interval, number, date) {
    /*
*————— DateAdd(interval,number,date) —————–
* DateAdd(interval,number,date)
* 功能:实现VBScript的DateAdd功能.
* 参数:interval,字符串表达式,表示要添加的时间间隔.
* 参数:number,数值表达式,表示要添加的时间间隔的个数.
* 参数:date,时间对象.
* 返回:新的时间对象.
* var now = new Date();
* var newDate = DateAdd(“d”,5,now);
* author:wanghr100(灰豆宝宝.net)
* update:2004-5-28 11:46
* modify:Jean.want(ishere.cn)
* modifydate:2007-5-23 16:57
*————— DateAdd(interval,number,date) —————–
*/

    number = parseInt(number);
    switch (interval) {
    case“y”:
        {
            date.setFullYear(date.getFullYear() + number);
            break;
        }
    case“q”:
        {
            date.setMonth(date.getMonth() + number * 3);
            break;
        }
    case“m”:
        {
            date.setMonth(date.getMonth() + number);
            break;
        }
    case“w”:
        {
            date.setDate(date.getDate() + number * 7);
            break;
        }
    case“d”:
        {
            date.setDate(date.getDate() + number);
            break;
        }
    case“h”:
        {
            date.setHours(date.getHours() + number);
            break;
        }
    case“m”:
        {
            date.setMinutes(date.getMinutes() + number);
            break;
        }
    case“s”:
        {
            date.setSeconds(date.getSeconds() + number);
            break;
        }
    default:
        {
            date.setDate(d.getDate() + number);
            break;
        }
    }
    return date.toLocaleDateString();
}
Posted in keyboard's joy | Tagged | Leave a comment

艾薇儿新歌《The Best Damn Thing》好听的很,下载下来听听

http://www.ishere.cn/wp-content/uploads/200705/22_084457_girlfriendthebestdamnthing.mp3

Avril Lavigne – The Best Damn Thing
专辑:The Best Damn Thing
LRC Produced By
Album:The Best Damn Thing
Avril Lavigne-The Best Damn Thing
Let me hear you say hey hey hey
Alright, now let me hear you
say hey hey ho
I hate it when a guy doesn’t get the door
Even though I told him yesterday
and the day before
I hate it when a guy
doesn’t get the tab
And I have to pull my money out
and that looks bad
Where are the hopes,
where are the dreams
My Cinderella story scene
When do you think
they’ll finally see
That you’re not not not
gonna get any better
You won’t won’t won’t
you won’t get rid of me never
Like it or not even though
she’s a lot like me
We’re not the same
And yeah yeah yeah
I’m a lot to handle
You don’t know trouble
but I’m a hell of a scandal
Me I’m a scene
I’m a drama queen
I’m the best damn thing
that your eyes have ever seen
Alright Alright yeah
I hate it when a guy doesn’t understand
Why a certain time of month
I don’t want to hold his hand
I hate it when they go out and we stay in
And they come home smelling like
their ex-girlfriend
But I found my hopes
I found my dreams
My Cinderella story scene
Now everybody’s gonna see
That you’re not not not
gonna get any better
You won’t won’t won’t
you won’t get rid of me never
Like it or not even though
she’s a lot like me
We’re not the same
And yeah yeah yeah
I’m a lot to handle
You don’t know trouble
but I’m a hell of a scandal
Me I’m a scene I’m a drama queen
I’m the best damn thing
that your eyes have ever seen
Give me an A,
always give me what I want
Give me a V,
be very very good to me
R, are you gonna treat me right
I, I can put up a fight
Give me an L,
let me hear you scream loud
One two three four
Where are the hopes,
where are the dreams
My Cinderella story scene
When do you think
they’ll finally see
That you’re not not not
gonna get any better
You won’t won’t won’t
you won’t get rid of me never
Like it or not even though
she’s a lot like me
We’re not the same
And yeah yeah yeah
I’m a lot to handle
You don’t know trouble
but I’m a hell of a scandal
Me I’m a scene I’m a drama queen
I’m the best damn thing
that your eyes have ever seen
Let me hear you say hey hey hey
Alright, now let me hear
you say hey hey ho
I’m the best damn thing
that your eyes have ever seen

Posted in life's shadow | Leave a comment

记住这句话

在 JScript 表达式中,正则表达式后面的全局标志 (‘g’) 表示该表达式将用来在输入字符串中查找尽可能多的匹配。大小写敏感性由表达式结束处的大小写敏感性标记 (‘i’) 指定。

Posted in javascript | Tagged | Leave a comment

回忆 味道

中午喝了点酒,呵呵.

然后又翻看了以前的照片,去年大跃进的照片,一张张熟悉的笑脸,好亲切!可是现在都不在身边了,为了工作各奔东西,虽然在同一座城市,却难得见上一面. [cry]

在一起的感觉真好,想念我的朋友们!

于是,我决定这个周末邀他们出来玩,夏天到了,喝个散啤,吃个烧烤,应该也是一件快乐的事情!

Posted in life's shadow | Leave a comment

JS判断邮箱格式

邮箱格式要求是:

  • 必须包含一个并且只有一个符号@
  • 第一个字符不能是’@'或者’.’
  • 不允许出现’@.’或者’.@’或者’-@’或者’@-’
  • 结尾不得是字符’@'或者’.’
  • 字符@后面只能是’A-Za-z0-9′
1
2
3
4
5
6
7
8
9
10
11
function checkMail(str) {
    var strReg =";
    var r;
    var strText=document.all(str).value;
    var strReg=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/i; strReg=/^\w+((-\w+)|(\.\w+))*\@{1}\w+\.{1}\w{2,4}(\.{0,1}\w{2}){0,1}/ig;
    r=strText.search(strReg);
    if(r==-1) {
        alert(“邮箱格式错误!”);
       document.all(str).focus();
    }
}
1
<input name="email" type="text" class="input" id="email" onChange="checkMail('email')" />
Posted in keyboard's joy | Tagged , , | Leave a comment

windows2003去掉关机事件跟踪

在运行中输入gpedit.msc,打开“组策略编辑器”,选择“本地计算机策略→计算机配置→管理模板→系统”,接着双击右侧窗口中的“显示关闭事件跟踪程序”,最后在“设置”选项卡中“已禁用”即可。
[lol]

Posted in windows | Tagged | Leave a comment

Vista操作系统,挺可爱的,也挺无奈的!

Windows Vista操作系统出来有一段时间了,一直想尝试一下,前天从同事那里整了个中文的,装上了,感觉就是不一样,那效果,没治了。
可是有些软件不能在这个平台上运行,但又是工作必需的,唉,无奈啊,只能割爱了。真是一口好锅,却不能煮肉!
只能又换回了Windows 2003 server,老伙伴了。
[cool]

Posted in windows | Tagged | Leave a comment

ASP Session对象的集合以及属性方法事件

asdf

Posted in ASP | Tagged | Leave a comment

高兴,今天SUN[奇迹世界]可以公测下载了!

呵呵,挺高兴的,从年前就等这个游戏,现在终于等到头了. [cool]

 

http://www.ishere.cn/wp-content/uploads/200704/06_095315_sun.jpg

 

Posted in life's shadow | Leave a comment

w3JMail4.4免费下载级使用说明(例子)

Click Here To Download

<%
On error resume next
Dim JMail, contentId
Set JMail = Server.CreateObject("JMail.Message")
JMail.Charset = "gb2312" ‘邮件字符集,默认为"US-ASCII"
‘ JMail.ISOEncodeHeaders = False ‘ 是否进行ISO编码,默认为True

‘ 发送者信息(可用变量方式赋值)
JMail.From = "username@domain.com" ‘ 发送者地址
JMail.FromName = "名字" ‘ 发送者姓名
JMail.Subject = "主题" ‘ 邮件主题

‘ 身份验证
JMail.MailServerUserName = "username" ‘ 身份验证的用户名
JMail.MailServerPassword = "password" ‘ 身份验证的密码(这里用到的用户名与密码和上面发送者地址的信箱要一致)

‘ 设置优先级,范围从1到5,越大的优先级越高,3为普通
JMail.Priority = 3

JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")

‘ 加入一个收件人【变量email:收件人地址】可以同一语句重复加入多个
JMail.AddRecipient "jena.want@gmail.com","迦楠"
JMail.AddRecipient "jena.want@yahoo.com","迦楠"

‘ 加入附件【变量filename:附件文件的绝对地址,确保用户IUSR_机器名有访问的权限】
‘ 【参数设置是(True)否(False)为Inline方式】
‘contentId = JMail.AddAttachment (Server.MapPath("jmail_template.asp"), True)

‘ 邮件主体(HTML(注意信件内链接附件的方式))
JMail.HTMLBody = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" /><title>无标题文档</title><style type=""text/css"">body,td,th {font-family: Georgia, Times New Roman, Times, serif;font-size: 14px;}body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}</style></head><body><table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""3""><tr><td>亲爱的 迦楠 : </td></tr><tr><td></td></tr><tr><td>&nbsp;</td></tr><tr><td><font color=red size=5>邮件正文</font>,邮件正文,邮件正文</td></tr><tr><td align=""center"">jena.want</td></tr></table></body></html>"

‘ 邮件主体(文本部分)
JMail.Body = "我们的邮件采用了HTML格式,但是您的邮件查看软件可能不支持。。。邮件正文,邮件正文,邮件正文"

‘ 发送【调用格式:JMail.Send([username:password@]SMTPServerAddress[:Port])】
JMail.Send("smtp.163.com")

‘ 关闭并清除对象
JMail.Close()
Set JMail = Nothing

if err.number<>0 then
 response.write "邮件发送失败!"
 response.write err.description
else
 response.write "邮件发送成功!"
end if
%>

Posted in jmail | Tagged | 2 Comments

喜欢音乐吗?!! 你

这几天一直刮大风,大北风,好冷啊.
唉,这气候真不正常,该热的时候不热 ,该冷的时候不冷,难道南北极的冰雪都化了?

不说这个了,冷就冷吧,大不了多穿点.

昨天加上了个音乐播放器,嘿嘿,感觉不错,优点就是在操作别的页的时候,音乐依然在,以前那个音乐盒不行.

哈哈 [lol] 高兴!!! 喜欢音乐的朋友就进"音乐版"吧.

原来的LBS-BLOG

Posted in life's shadow | Leave a comment

安全人生

http://www.ishere.cn/wp-content/uploads/200704/03_111422_0bdd347828df9a815ad89f032ce496b0.jpg

安全人生
天际,悄悄张开一面巨大的安全网。
但荡向云端的狂热,却渐渐熄灭。
我想在天空里飞腾穿梭,
享受难得的刺激,
请暂时忽略我身体的安危,
关怀我心灵对自由的渴求。

Posted in Jimmy | Tagged | Leave a comment

愚人节,这个节日过了吗?

今天愚人节了,没有什么感觉.
不知道你被愚了没有?不知道被愚是啥滋味,呵呵,我想,在这个节目被愚弄一下,那也是善意的吧.

祝朋友们节日快乐!!

Posted in some words | Leave a comment

无题之说

是不是看同样的东西时间长了就会有视觉疲劳?
俺这个小站一直都是深色调了,除了黑还是黑,今天晚上突然看着就有点累了,干脆,换一个风格吧.
都说绿色看着舒服,能缓解疲劳,希望看绿色时间长了也会疲劳,那我这番功夫可就是徒劳了. [redface]

先这样看着吧,花了我一个小时的时间.

原来的LBS-BLOG

Posted in some words | Leave a comment

让弹出窗口(网页对话框)自适应图片大小

好长时间没写东西了,唉,瞎忙.
今天上午网站上需要一个弹出窗口,要求是图片多大, 窗口就多大.又是JS的问题,查了又查,终于有点眉目了,就是Image()对象可以解决这个问题.网上有很多例子,但都是弹出的窗口(虽然这篇题目也是写的窗口),而我要的是弹出”网页对话框”,只有一个关闭按钮,没有右键的.
下面这段代码是经过我修改过的,能达到上述的效果,现在贴出来供大家参考:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script type="text/javascript" language="javascript">

<!--

/*Jena.want 2007/03/30 www.IsHere.cn*/

var imgObj;

function checkImg(theURL,winName){ if (typeof(imgObj) == "object"){ if ((imgObj.width != 0) &#038;&#038; (imgObj.height != 0)) //OpenFullSizeWindow(theURL,winName, ",width=" + (imgObj.width+20) + ",height=" + (imgObj.height+30)); OpenFullSizeWindow(theURL,winName, "dialogWidth:" + (imgObj.width) + "px;dialogHeight:" + (imgObj.height)); else setTimeout("checkImg(\'" + theURL + "\',\'" + winName + "\')", 100); } }

function OpenFullSizeWindow(theURL,winName,features) {

var aNewWin, sBaseCmd; //sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,"; sBaseCmd = "px;dialogleft:100px;help:no;status:no;scroll:no";

if (features == null || features == ""){ imgObj = new Image();// 创建图像对象 imgObj.src = theURL;// 设置图像源 checkImg(theURL, winName)// 开始获取图像大小 } else{ //aNewWin = window.open(theURL,winName, sBaseCmd + features);// 打开窗口 aNewWin = showModalDialog(theURL,winName,features + sBaseCmd); //aNewWin.focus();// 聚焦窗口,这个地方在弹出网页对话框的时候不能使用. } }

//--></script>

然后这样调用:

1
<a href="http://www.ishere.cn/styles/blogLogo88_31.gif" onclick="OpenFullSizeWindow(this.href,'','');return false"><img src="http://www.ishere.cn/styles/blogLogo.gif" /></a>
Posted in javascript | Tagged | Leave a comment

街头的超强3D漫画,你看出来了吗?你佩服吗!?

http://www.ishere.cn/wp-content/uploads/200703/21_171429_1.bmp

 

http://www.ishere.cn/wp-content/uploads/200703/21_171449_2.bmp

 

Continue reading

Posted in life's shadow | Leave a comment

开始新的一天

工作安排的差不多了,住的地方也弄好了,环境不错。
[smile]
新的一天开始了,拉开了2007奋斗的序幕!

Posted in some words | Leave a comment

忽然

http://www.ishere.cn/wp-content/uploads/200703/07_160728_25c213ddae307998de86dcaf7d531530.jpg

忽然就到了一种让人沮丧的年纪,
开始厌烦过生日。
忽然就觉得人生没什么好叙说,
回忆,如此美好。
忽然朋友都不见了,电脑、电视、
冰箱变得亲密。
忽然,半夜坐在马路上喝啤酒,
不是青春浪漫是晚景凄凉。
忽然……

Posted in Jimmy | Tagged | Leave a comment

最近的状况

在这里好长时间没有更新了,从过年回来事就特别多,上班的时间瞎忙活,也不知道干了些什么,没有什么值得记录下来的,心情不是挺好的,公司有调整,人员有变动,弄的心里挺毛的.

总有出头之日,2007,新年新气象,看我的!

Posted in some words | Leave a comment