當前位置:首頁 » 編程軟體 » vbscript腳本語言if

vbscript腳本語言if

發布時間: 2024-02-04 11:03:12

『壹』 在HTML中用VBScript腳本語言來顯示系統當前的日期

在html里要用js
*********************************************
<!--顯示日期的js代碼-->
<script type="text/javascript">
<!--
function MM_showHideLayers() { //v6.0
for (var i=1; i<=1; i++) { //i<辯純談=層的數目
layerObj=eval('Layer'+i);
layerObj.style.visibility='hidden';
}
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
if ((obj=MM_findObj(args[i]))!=null) {
v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v;
}
}
function MM_findObj(n, d) { //v4.01
var p,i,x;
if (!d) d=document;
if ((p=n.indexOf("?"))>0 && parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if (!(x=d[n]) && d.all) x=d.all[n];
for (i=0; !x&&i<d.forms.length; i++) x=d.forms[i][n];
for (i=0; !x&&d.layers&&i<d.layers.length; i++) x=MM_findObj(n,d.layers[i].document);
if (!x && d.getElementById) x=d.getElementById(n);
return x;
}

function showweek() { //顯示中文星期
now = new Date() //定攜碰義新對象,new具有Date的性質
if (now.getDay() == 0) return ("星期日")
if (now.getDay() == 1) return ("星期一")
if (now.getDay() == 2) return ("星期二")
if (now.getDay() == 3) return ("星期三")
if (now.getDay() == 4) return ("星期四")
if (now.getDay() == 5) return ("星期五")
if (now.getDay() == 6) return ("星期六")
}
function showdate() { //顯示系統日期
var now = new Date()
var year = now.getYear()
var month = now.getMonth()+1
var day = now.getDate()
return year+"年"+month+"月"+day+"日"
}
//document.write("<span style='position:absolute; left:40px; top:115px; font-size:10pt; color:#FFFFFF'>"+showdate()+" "+showweek()+"</span>")
//-->
</script>

這里是調用<script>document.write("<span color:#000'>今天是褲碼"+showdate()+" "+showweek()+"</span>");</script>

不知道是不是你要的效果.

『貳』 會編vbscript腳本語言的兄弟們----求助

dim strname
dim i=0
strname+inputbox("請輸入你的大名:")
if strname="xxx" then
wscript,echo strname & ": 你好!"
else
wscript,echo strname & ": 你不是她,你是個渾蛋!"
i=i+1
end if
if i=3 then window.close()

『叄』 vbscript是什麼腳本語言

VBScript是Visual Basic Script的簡稱,即 Visual Basic 腳本語言,有時也被縮寫為VBS。它是一種微軟環境下的輕量級的解釋型語言,它使用COM組件、WMI、WSH、ADSI訪問系統中的元素,對系統進行管理。同時它又是asp動態網頁默認的編程語言,配合asp內建對象和ADO對象,用戶很快就能掌握訪問資料庫的asp動態網頁開發技術。

熱點內容
centos安裝php52 發布:2025-07-12 15:14:19 瀏覽:296
usb介面編程 發布:2025-07-12 15:14:19 瀏覽:214
演算法學習心得 發布:2025-07-12 15:14:08 瀏覽:792
華為手機內核編譯 發布:2025-07-12 15:13:13 瀏覽:837
匯編語言編譯器masm 發布:2025-07-12 14:57:37 瀏覽:56
校園網伺服器ip地址 發布:2025-07-12 14:55:02 瀏覽:238
如何用密碼鎖定 發布:2025-07-12 14:39:10 瀏覽:925
軟體發布源碼 發布:2025-07-12 14:29:34 瀏覽:179
sql函數和存儲過程的區別 發布:2025-07-12 14:26:37 瀏覽:30
查看存儲功空間 發布:2025-07-12 14:17:22 瀏覽:942