JS:<head>
<title>Add files</title>
<script type="text/javascript">
function getPath() {
var path = document.getElementById("file").Value;
return path; }
</script>
</head>
JSP:
<td>
<s:file name="file" id="file" >
<s:hidden name="filepath" value="????"></s:hidden>
</s:file>
</td>
请问加下划线的地方表达式如何写?谢谢。
<title>Add files</title>
<script type="text/javascript">
function getPath() {
var path = document.getElementById("file").Value;
return path; }
</script>
</head>
JSP:
<td>
<s:file name="file" id="file" >
<s:hidden name="filepath" value="????"></s:hidden>
</s:file>
</td>
请问加下划线的地方表达式如何写?谢谢。
直接给hidden标签赋值不行吗? document.getElementById("filepath").value = "http://***";
document。getElementByName(“filepath”)=document.getElementById("file").Value;So easy!