input file
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 runat="server">
<title>无标题页 </title>
<script type="text/javascript">
function showvalue()
{
alert(document.getElementById("File1").value);
}
</script>
</head>
<body>
<form id="form1" runat="server" enctype="multipart/form-data">
<input id="File1" type="file" />
</form>
<input id="Button1" type="button" onclick="showvalue()" value="button" />
</body>
</html>
上传任何位置的任何文件 点Button1 都弹出C:\fakepath\文件名 (ie6 为文件的完整路径)
我用的是ie8(好像ie不一样这里的value都不一样)不知道我说的对不对
我非常急已经有两个星期了,之前也有提问可是没人回答我,
如果上述问题不能解决的话 我只要一个控件,它有属性能获得客户端的文件的完整地址即可
fjqagx@yahoo.com.cn