用document.getElementById("file").value;只能得到图片名
怎么才能得到完全路径
请各位高手指教~~
怎么才能得到完全路径
请各位高手指教~~
解决方案 »
- C#定义数组时,用指定长度吗?
- 在winform中如何做出比较玄的效果?尽量不要贴图
- 基于BindingSource,父子窗体之间的传值,请各位高手多多指教
- c/s软件,多用户间的通讯问题.
- 各位认为窗体程序和类库要相互依赖该怎么处理?
- HttpWebResponse问题: (400) Bad Request
- 搜集了 String是Value Type还是Reference Type?
- 请问有没有C#实例教程的网站
- 请教高手ASP.NET中怎样调用标准C的类库
- 两种获得http页面的方法(socket,httpwebrequest)哪一种速度快,稳定?
- VS2008中文版是否支持MVC ?
- 求助 後臺方法 掉用 JS 變量 在線等!
<!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=utf-8" />
<title>无标题文档</title><script type="text/javascript" >
function erew()
{
alert(document.getElementById("fies").value);
}
</script></head>
<body>
<input type="file" id="fies" />
<input type="button" value="rtest" id="rest" onclick="erew()"/>
</body>
</html>
http://www.y7l8.com/2009/06/07/firefox-%E5%A4%9A%E6%B5%8F%E8%A7%88%E5%99%A8-%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87-%E6%9C%AC%E5%9C%B0%E9%A2%84%E8%A7%88.htmlhttp://www.foolbirds.com/image-upload-preview.html
userPostedFile.SaveAs(filepath + "\\" + System.IO.Path.GetFileName(userPostedFile.FileName));
js就不知道是不是有通用的方法了