如何获取FormFile的绝对路径
1个回答
展开全部
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script>
function pageX(elem){
return elem.offsetParent?(elem.offsetLeft+pageX(elem.offsetParent)):elem.offsetLeft;
}
function setX(elem,pos){
elem.style.left=pos+"px";
}
function fclick(obj,elem){
var pos = pageX(elem);
setX(obj,pos);
}
function readFile(elem){
document.getElementById("mytext").value = elem.value;
}
</script>
<form enctype="multipart/form-data">
<input id="mytext" type="text" readonly="true"> <input type="button" onmouseover="fclick(t_file,this)" value="为了改这">
<input name="upload" type="file" id="t_file" onchange="readFile(this)" style="position:absolute;filter:alpha(opacity=0);opacity:0;width:30;">
</form>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script>
function pageX(elem){
return elem.offsetParent?(elem.offsetLeft+pageX(elem.offsetParent)):elem.offsetLeft;
}
function setX(elem,pos){
elem.style.left=pos+"px";
}
function fclick(obj,elem){
var pos = pageX(elem);
setX(obj,pos);
}
function readFile(elem){
document.getElementById("mytext").value = elem.value;
}
</script>
<form enctype="multipart/form-data">
<input id="mytext" type="text" readonly="true"> <input type="button" onmouseover="fclick(t_file,this)" value="为了改这">
<input name="upload" type="file" id="t_file" onchange="readFile(this)" style="position:absolute;filter:alpha(opacity=0);opacity:0;width:30;">
</form>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询