This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-Data { | |
Param ( | |
[int] $data = -1 | |
) | |
return $data; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") > $null | |
[System.EnterpriseServices.Internal.Publish] $publish = | |
New-Object System.EnterpriseServices.Internal.Publish | |
$publish.GacInstall("<DLL的完整路径>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = { | |
value:"x", | |
a:function() { | |
alert(this.value); | |
} | |
}; | |
var y = { | |
value: "y", | |
a:x.a | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xmlhttp = NewXmlHttpRequest(); | |
xmlhttp.open("Get", "http://leonax.net", false); | |
xmlhttp.send(); | |
alert(xmlhttp.responseText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xmlhttp = NewXmlHttpRequest(); | |
xmlhttp.open("Get", "http://leonax.net"); | |
xmlhttp.send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var command = WScript.Arguments.Item(0); | |
var argument = ""; | |
for (var i = 0; i < WScript.Arguments.Count(); ++i){ | |
argument += WScript.Arguments.Item(i) + " "; | |
} | |
try{ | |
var shellapp = new ActiveXObject("Shell.Application"); | |
shellapp.ShellExecute(command, argument, null, "runas", 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xmlhttp = NewXmlHttpRequest(); | |
xmlhttp.open("GET", "http://leonax.net/feed/", false); | |
xmlhttp.send(); | |
var doc = xmlhttp.responseXML; | |
var items = doc.selectNodes("//item"); | |
for (var i = 0; i < items.length; ++i) { | |
var item = items[i]; | |
var title = item.selectSingleNode("title"); | |
var link = item.selectSingleNode("link"); | |
alert(title.text + " @ " + link.text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xmlhttp = NewXmlHttpRequest(); | |
xmlhttp.open("GET", "http://leonax.net/feed/", false); | |
xmlhttp.responseXML.setProperty("MaxElementDepth", 1); | |
xmlhttp.send(); | |
var doc = xmlhttp.responseXML; | |
alert(doc.parseError.reason); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = NewXmlHttpRequest(); | |
xhr.open("GET", "http://leonax.net/", false); | |
//Pretend to be safari on iPhone | |
xhr.setRequestHeader("User-Agent", | |
"Mozilla/5.0 (iPhone; U; us; CPU iPhone OS 4_2_1 like Mac OS X; us) " + | |
"AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148" + | |
"a Safari/6533.18.5"); | |
xhr.send(); | |
alert("iPhone Content length = " + xhr.responseText.length); | |
xhr.open("GET", "http://leonax.net/", false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = NewXmlHttpRequest(); | |
xhr.open("GET", "http://leonax.net/", false); | |
xhr.send(); | |
alert(xhr.status + " " + xhr.statusText); | |
xhr.open("GET", "http://leonax.net/PageNotFound/", false); | |
xhr.send(); | |
alert(xhr.status + " " + xhr.statusText); |