<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function show(){
alert(document.getElementById("test").value);
}
</script>
</head><body>
<input type="file" name="file1" onchange="show()" id="test"/>
</body>
</html>
发现不论上传的文件的位置在哪里,都显示的是c盘的某个目录(貌似定死的样子) 求解决方案
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function show(){
alert(document.getElementById("test").value);
}
</script>
</head><body>
<input type="file" name="file1" onchange="show()" id="test"/>
</body>
</html>
发现不论上传的文件的位置在哪里,都显示的是c盘的某个目录(貌似定死的样子) 求解决方案
$$B.firefox ? "domfile" :
$$B.opera || $$B.chrome || $$B.safari ? "remote" : "simple";