[b]1.ie6:[/b]
var file_url = document.getElementById("file").value;
[b]2.ie7/ie8:[/b]
var file = document.getElementById("file");
file.select();
var file_url = document.selection.createRange().text;
[b]3.firefox3.0[/b]
var file_url = document.getElementById("file").files[0].getAsDataURL();
[b]js 判断IE浏览器版本[/b]<script type="text/javascript">
var browser=navigator.appName
var b_version=navigator.appVersion
var version=b_version.split(";");
var trim_Version=version[1].replace(/[ ]/g,"");
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0")
{
alert("IE 7.0");
}
else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0")
{
alert("IE 6.0");
}
</script>
var file_url = document.getElementById("file").value;
[b]2.ie7/ie8:[/b]
var file = document.getElementById("file");
file.select();
var file_url = document.selection.createRange().text;
[b]3.firefox3.0[/b]
var file_url = document.getElementById("file").files[0].getAsDataURL();
[b]js 判断IE浏览器版本[/b]<script type="text/javascript">
var browser=navigator.appName
var b_version=navigator.appVersion
var version=b_version.split(";");
var trim_Version=version[1].replace(/[ ]/g,"");
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0")
{
alert("IE 7.0");
}
else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0")
{
alert("IE 6.0");
}
</script>