62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TT.aspx.cs" Inherits="TT" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<asp:FileUpload ID="FileUpload1" runat="server" />
<input id="File1" type="file" />
<input id="Button1" type="button" value="input File" onclick="alert(File1.value);" />
<input id="Button2" type="button" value="asp:FileUpload" onclick="alert(FileUpload1.value);" />"/>
</form>
</body>
</html>
<input type="file" name="upload" onchange="test(this)" />
function test(img){
var url = img.value;
alert(url);
}