2012-05-01から1ヶ月間の記事一覧
WScript.Echo("abcabc".lastIndexOf("a")); WScript.Echo("abcabc".lastIndexOf("a", 1)); WScript.Echo("abcabc".lastIndexOf("a", -1)); WScript.Echo("abcabc".lastIndexOf("a", 10));
WScript.Echo([1,2,3].join()); WScript.Echo([1,2,3].join("")); WScript.Echo([1,2,3].join(" "));
e = new Enumerator([1,2,3]); WScript.Echo(e.item()); e.moveNext(); WScript.Echo(e.item()); e.moveNext(); WScript.Echo(e.item()); e.moveNext(); WScript.Echo(e.item());
WScript.Echo("foo".italics());
WScript.Echo(isNaN(1)); WScript.Echo(isNaN(1/0)); WScript.Echo(isNaN(0/0)); WScript.Echo(isNaN("foo"));
WScript.Echo(isFinite(1)); WScript.Echo(isFinite(1/0));
WScript.Echo("abc".indexOf("b")); WScript.Echo("abc".indexOf("bc")); WScript.Echo("abc".indexOf("d")); WScript.Echo("abcabc".indexOf("a", 1)); WScript.Echo("abc".indexOf("a", -1)); WScript.Echo("abc".indexOf("c", 10));
WScript.Echo(new Date().getYear());
WScript.Echo(new Date().getVarDate());
WScript.Echo(new Date().getUTCSeconds());
WScript.Echo(new Date().getUTCMonth());
WScript.Echo(new Date().getUTCMinutes());
WScript.Echo(new Date().getUTCMilliseconds());
WScript.Echo(new Date().getUTCHours());
WScript.Echo(new Date().getUTCFullYear());
WScript.Echo(new Date().getUTCDay());
WScript.Echo(new Date().getUTCDate());
WScript.Echo(new Date().getTime()); まんま function GetTimeTest() { var d, s, t; var MinMilli = 1000 * 60; var HrMilli = MinMilli * 60; var DyMilli = HrMilli * 24; d = new Date(); t = d.getTime(); s = "1970 年 1 月 1 日より " s += Math.rou…
WScript.Echo(new Date().getSeconds());
WScript.Echo(new Date().getMonth());
WScript.Echo(new Date().getMinutes());
WScript.Echo(new Date().getMilliseconds());
まんま <HEAD> <SCRIPT LANGUAGE="VBScript"> <!-- Function CreateVBArray() Dim i, j, k Dim a(2, 2) k = 1 For i = 0 To 2 For j = 0 To 2 a(i, j) = k document.writeln(k) k = k + 1 Next document.writeln("<BR>") Next CreateVBArray = a End Function --> </SCRIPT> <SCRIPT LANGUAGE="JScript"> </head>
WScript.Echo(new Date().getHours());
WScript.Echo(new Date().getFullYear());
WScript.Echo(new Date().getDay());
WScript.Echo(new Date().getDate());
WScript.Echo(String.fromCharCode(112, 108, 97, 105, 110)); // plain WScript.Echo(String.fromCharCode(0x3042, 0x3044, 0x3046)); // あいう UTF-16 のようだ
WScript.Echo("foo".fontsize(10)); WScript.Echo("foo".fontsize(-1)); WScript.Echo("foo".fontsize("10"));
WScript.Echo("foo".fontcolor("red")); WScript.Echo("foo".fontcolor(255)); WScript.Echo("foo".fontcolor("#FF0000"));