Node.js 发布 0.9.8 开发版,主要改进内容包括:
- npm: Upgrade to v1.2.3
- V8: Upgrade to 3.15.11.10
- streams: Support objects other than Buffers (Jake Verbaten)
- buffer: remove float write range checks (Trevor Norris)
- http: close connection on 304/204 responses with chunked encoding (Ben Noordhuis)
- build: fix build with dtrace support on FreeBSD (Fedor Indutny)
- console: Support formatting options in trace() (isaacs)
- domain: empty stack on all exceptions (Dave Olszewski)
- unix, windows: make uv_*_bind() error codes consistent (Andrius Bentkus)
- linux: add futimes() fallback (Ben Noordhuis)
相关地址:
Source Code: http://nodejs.org/dist/v0.9.8/node-v0.9.8.tar.gz
Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.8/node-v0.9.8.pkg
Windows Installer: http://nodejs.org/dist/v0.9.8/node-v0.9.8-x86.msi
Windows x64 Installer: http://nodejs.org/dist/v0.9.8/x64/node-v0.9.8-x64.msi
Windows x64 Files: http://nodejs.org/dist/v0.9.8/x64/
Linux 32-bit Binary: http://nodejs.org/dist/v0.9.8/node-v0.9.8-linux-x86.tar.gz
Linux 64-bit Binary: http://nodejs.org/dist/v0.9.8/node-v0.9.8-linux-x64.tar.gz
Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.8/node-v0.9.8-sunos-x86.tar.gz
Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.8/node-v0.9.8-sunos-x64.tar.gz
Other release files: http://nodejs.org/dist/v0.9.8/
Website: http://nodejs.org/docs/v0.9.8/
Documentation: http://nodejs.org/docs/v0.9.8/api/
本文链接
方法如下:
2 var self = this;
3 var _a = this.concat().sort();
4 _a.sort(function(a,b){
5 if(a == b){
6 var n = self.indexOf(a);
7 self.splice(n,1);
8 }
9 });
10 return self;
11 };
使用方法:
2 a.distinct();
本文链接
前台:
<script type="text/javascript">$(function () {
$("#btn1").click(function () { //不带参数
$.ajax({
type: "POST",
url: "WebService1.asmx/HelloWorld",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (json) { alert(json.d); },
error: function (error) {
alert("调用出错" + error.responseText);
}
});
});
$("#btn2").click(function () { //带参数
$.ajax({
type: "POST",
url: "WebService1.asmx/ReturnString",
data: "{s:'" + $("#txt").val() + "'}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (json) { alert(json.d); },
error: function (error) {
alert("调用出错" + error.responseText);
}
});
&nb