Who Can Tell Me把图片上传到什么地方,不会每天都变更一个链接地址,以至于引用的时候不会失效?我在雅虎空间、百度空间都试了,老是天天换,搞得我很机械。
[ Last edited by Billunique on 2007-4-26 at 01:40 AM ]

[ Last edited by Billunique on 2007-4-26 at 01:40 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

最近好忙啊~忙得忽略了学习,这样可不好。要知道知识是需要巩固的,要常记常用才能成为自己受用的知识。echo msgbox 3^>2 >v.vbs
cscript v.vbs
<HTML>
<HEAD>
<TITLE>测试按钮事件</TITLE>
</HEAD>
<BODY>
<FORM NAME="Form1">
<INPUT TYPE="Button" NAME="Button1" VALUE="单击">
<SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">
MsgBox "按钮被单击!"
</SCRIPT>
</FORM>
</BODY>
</HTML>ask="Hey,what's your name?"
title="Who are you?"
answer=InputBox(ask,title)
If answer=vbEmpty Then
MsgBox "You want to cancel? Fine!"
WScript.Quit
ElseIf answer=""Then
MsgBox "You want to stay incognito,all right with me..."
Else
MsgBox "Welcome "&answer&"!"
End Ifask="Hey,what's your name?"
title="Who are you?"
default="??"
answer=InputBox(ask,title,default)
MsgBox "Welcome "&answer&"!"'asking for a date
ask="What's your birthday?"
title="Let's see how old you are!"
'start a loop:
Do
birthday=InputBox(ask,title)
'check whether the user wants to quit:
If IsEmpty(birthday)Then
MsgBox "Hey! You could always lie to me to hide " _
&" your age! But ok, I quit!"
WScript.Quit
ElseIf Not IsDate(birthday) Then
'check whether birthday is really a date!
'complain and give another chance:
MsgBox "You didn't enter a valid date! Try again!"
End If
'loop until a valid date was retrieved
Loop Until IsDate(birthday)
'at this point,we have a valid date,good!
'do some fun calculations:
age_in_days=DateDiff("d",birthday,Date)
age_in_months=DateDiff("m",birthday,Date)
age_in_years=DateDiff("yyyy",birthday,Date)
day_born=WeekdayName(Weekday(birthday))
' DateDiff是比较两个日期间距的函数,第一个参数为比较单位,结果是第一个日期减去第二个日期的值。
' Weekday是返回“星天量”的函数(Sunday~Saturday:1~7)
' WeekdayName是返回“星天名”的函数。
'calculate this year's birthday
date_day=Day(birthday)
date_month=Month(birthday)
'use current year:
date_year=Year(Date)
' Day函数返回“月天量”(1~31)
' Month函数返回“年月量”(1~12)
' Year函数返回具体的“年量”(2007这种格式的)
' DateSerial函数接受三个参数,分别应为年、月、日的有效数值或表达式,
' 然后把它们重新排列成一个规范的含年、月、日的日期格式
this_years_birthday=DateSerial(date_year,date_month,date_day)
'use Abs to convert to positive numbers in case the birthday's already over:
days_to_birthday=Abs(DateDiff("d",Date,this_years_birthday))
day_celebrating=WeekdayName(Weekday(this_years_birthday))
' 因为是前参-后参,可能会出现负值,就是生日还没到,
' 于是用Abs(Absolute)换出其绝对值。
'already over?
If this_years_birthday<Date Then
message="you celebrated your birthday "& days_to_birthday &" days ago"
ElseIf this_years_birthday=Date Then
message="Happy birthday!!"
Else
message=days_to_birthday &" days to go!"
End If
'output information
msg="This is your birthday analysis:" & vbCr
msg=msg+"You are born on "& birthday & vbCr
msg=msg+"You are " & age_in_years &" yrs old. That's" & vbCr
msg=msg &age_in_months &" months or " & age_in_days &" days!" &vbCr
msg=msg+"You were born on a " & day_born &vbCr
msg=msg+"This year's birthday is on " & this_years_birthday &vbCr
msg=msg+"It's a " &day_celebrating &vbCr
msg=msg+message
MsgBox msg
' 利用msg自身叠加的方法达到最后的输入效果,很典型,要掌握。result = MsgBox(“Do you agree?”)
result = MsgBox(“Continue?”, vbYesNo+vbQuestion, “What now?”)
'get arguments as collection object
set args = WScript.Arguments
' check whether there are any arguments:
if args.Count = 0 then
'no arguments
MsgBox “You called this script directly, no arguments specified!”
else
for each argument in args
list = list & argument & vbCr
next
MsgBox “Here’s the list of arguments:” & vbCr & list
end if'check whether script is run in CScript (DOS-Environment)
host =WScript.FullName
hostexe =LCase(Mid(host,InStrRev(host,"\")+1))
If Not hostexe = "cscript.exe" Then
'error! We run in wscript. so let's re-launch in cscript!
Set wshshell = CreateObject("wscript.shell")
wshshell.Run "cscript.exe"""& WScript.ScriptFullName &""""
'quit
WScript.Quit
End If
'get access to input and output stream:
Set input =WScript.StdIn
Set output =WScript.StdOut
output.Write "> "
Do Until input.AtEndOfStream
'read in lines:
line =input.ReadLine
'exit condition:stop loop once someone enter "exit":
If LCase(line)="exit" Then
Exit Do
Else
'interpret the command:
'replace? with output command
line = Replace(line,"?","output.writeline")
executeit line
output.Write "> "
End If
Loop
Sub executeit(command)
'execute is a separate procedure because it turns off
'build-in error handling
'This is necessary to keep the script running even if
'invalid command are entered:
On Error Resume Next
'execute statement:
ExecuteGlobal command
'did an error occur?
If Not Err.Number=0 Then
'yes,report cause:
output.WriteLine "error: " & Err.Description
Err.Clear
End If
End sub