在JavaScript中获取完整路径 [英] get full path in javascript
本文介绍了在JavaScript中获取完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从Java脚本中的上传文件获取完整路径.请帮助我
i want to get full path from uploaded file in java script.please help me
推荐答案
为什么要在服务器上使用客户端文件路径?以下主题中的讨论将让您知道它的进展情况
http://forums.asp. net/t/1077850.aspx/1?getting + the + full + file + path + from + a + FileUpload + control [
Why you want the client file path on server? The discussion in following thread will let you know how it goes
http://forums.asp.net/t/1077850.aspx/1?getting+the+full+file+path+from+a+FileUpload+control[^]
尝试:
try this:
<script>
function getfilename()
{
var filename=document.getElementById("filename").value;
alert(filename);
}
</script>
<form onsubmit="getfilename();">
<input name="filename" id="filename" type="file"/>
<form /></form>
希望对您有所帮助:)
hope this helps :)
据我所知,由于安全限制,这是不可能的.
As far as I am aware this is not possible due to security restrictions.
这篇关于在JavaScript中获取完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文