12月6
var userAgent=navigator.userAgent
if(userAgent.index0f("OPR")> -1){
//0pera浏览器,因为Opera浏览器的userAgent也有Chrome和Safari,所以要写在前面 alert("Opera");
}else if(userAgent.index0f("Version")>-1&&userAgent.index0f("Safari")> -1){
//没有更好的办法判断Safari浏览器,只能通过version(版本号)的英又来断,因为别的游览器版本号不是这样写的 alert("Safari"):
}else if(userAgent.index0f("Chrome")> -1){
//谷歌浏览器也有可能是使朋Chrome内核的其他谢览器 alert("Chrome");
}else if(userAgent.index0f("Firefox")>-1){
//火狐浏览器
alert("Firefox");
}else if(userAgent.index0f("compatible")>-1 &&userAgent.index0f("MSIE 10.0")> -1){
//IE 10.0
alert("IE 10.0");
}else if(userAgent.index0f("compatible")>-1&& userAgent.index0f("MSIE 9.0")> -1){
//IE 9.0
alert("IE 9.0");
}else if(userAgent.index0f("compatible")>-1 &&userAgent.index0f("MSIE 8.0")> -1){
//IE 8.0
alert("IE 8.0");
helse if(userAgent.index0f("compatible")>-1&& userAgent.index0f("MSIE 7.0")> -1){
//IE 7.0
alert("IE 7.0");
各浏览器的navigator.userAgent
浏览器 navigator.userAgent
谷歌 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
火狐 Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Opera Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.635
Safari Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30
IE11.0 Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko
IE10.0 Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
IE9.0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
IE8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
IE7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
Windows NT 区别系统版本
系统版本 Windows NT
win 10 Windows NT 10.0
win 8 Windows NT 6.2
win 7 Windows NT 6.1
vista Windows NT 6.0
win xp Windows NT 5.1
win 2000 Windows NT 5.0
if(userAgent.index0f("OPR")> -1){
//0pera浏览器,因为Opera浏览器的userAgent也有Chrome和Safari,所以要写在前面 alert("Opera");
}else if(userAgent.index0f("Version")>-1&&userAgent.index0f("Safari")> -1){
//没有更好的办法判断Safari浏览器,只能通过version(版本号)的英又来断,因为别的游览器版本号不是这样写的 alert("Safari"):
}else if(userAgent.index0f("Chrome")> -1){
//谷歌浏览器也有可能是使朋Chrome内核的其他谢览器 alert("Chrome");
}else if(userAgent.index0f("Firefox")>-1){
//火狐浏览器
alert("Firefox");
}else if(userAgent.index0f("compatible")>-1 &&userAgent.index0f("MSIE 10.0")> -1){
//IE 10.0
alert("IE 10.0");
}else if(userAgent.index0f("compatible")>-1&& userAgent.index0f("MSIE 9.0")> -1){
//IE 9.0
alert("IE 9.0");
}else if(userAgent.index0f("compatible")>-1 &&userAgent.index0f("MSIE 8.0")> -1){
//IE 8.0
alert("IE 8.0");
helse if(userAgent.index0f("compatible")>-1&& userAgent.index0f("MSIE 7.0")> -1){
//IE 7.0
alert("IE 7.0");
各浏览器的navigator.userAgent
浏览器 navigator.userAgent
谷歌 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
火狐 Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Opera Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.635
Safari Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30
IE11.0 Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko
IE10.0 Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
IE9.0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
IE8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
IE7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
Windows NT 区别系统版本
系统版本 Windows NT
win 10 Windows NT 10.0
win 8 Windows NT 6.2
win 7 Windows NT 6.1
vista Windows NT 6.0
win xp Windows NT 5.1
win 2000 Windows NT 5.0
12月6
报错信息:
java.io.IOException: No space left on deviceat java.io.FileOutputStream.writeBytes(Native Method)at java.io.FileOutputStream.write(FileOutputStream.java:282)at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
服务器磁盘不足,df -h 一下,发现tmpfs挂载的tmp文件夹只有2M剩下的只有几K了,在想应该是这个问题,于是将tmp目录调大一点,下面调到2g,输入以下命令:
mount -t tmpfs -o size=2g tmpfs /tmp
重新上传文件,发现成功上传,问题解决。
java.io.IOException: No space left on deviceat java.io.FileOutputStream.writeBytes(Native Method)at java.io.FileOutputStream.write(FileOutputStream.java:282)at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
服务器磁盘不足,df -h 一下,发现tmpfs挂载的tmp文件夹只有2M剩下的只有几K了,在想应该是这个问题,于是将tmp目录调大一点,下面调到2g,输入以下命令:
mount -t tmpfs -o size=2g tmpfs /tmp
重新上传文件,发现成功上传,问题解决。




