如下代码
<script language=javascript>
function changeVal()
{
document.upForm.te.value = "c:/12.xml"; //此处弹出的对话框是空值
alert(document.upForm.te.value);
}
</script><body onload="changeVal()">
<form name="upForm" method="post" action="up2.jsp"enctype="multipart/form-data" >
<input type=file name="te">
</form>
</body>我发现Form表单中的te标签(type类型为File)无法赋值,在changeVal函数中赋值了,但alert时,仍然是空值,真的有点晕,如果想赋值,该如何写javascript脚本代码
<script language=javascript>
function changeVal()
{
document.upForm.te.value = "c:/12.xml"; //此处弹出的对话框是空值
alert(document.upForm.te.value);
}
</script><body onload="changeVal()">
<form name="upForm" method="post" action="up2.jsp"enctype="multipart/form-data" >
<input type=file name="te">
</form>
</body>我发现Form表单中的te标签(type类型为File)无法赋值,在changeVal函数中赋值了,但alert时,仍然是空值,真的有点晕,如果想赋值,该如何写javascript脚本代码
解决方案 »
- 关于封装连接数据库函数的问题?
- 【求教】【字符串显示问题续】
- LPCRECT类型
- 在vc中,怎样将一个小数显示为百分比的形式?
- 〖官方〗招收候选版主10-40名,要求一星或二星
- 关于skin和设置控件字体的问题
- 各位兄弟,请帮帮忙啊(我为什么就连不上SMPP服务器?)
- VC如何实现修改打印机流
- 怎样在dialog里设变量
- How to get the function you given?
- In-destroy and Out-destry of an object of a dialog class 对话框类对象的自销毁与外销毁 普通MFC实现模式实践
- 大家看看这个DLL,是微软的可以绝对读盘的DLL写法,可是好象不行,不知道为什么??
--------------------------------------------------------------------------------
Retrieves the file name of the INPUT control object after the text is set by user input.SyntaxHTML N/A
Scripting [ sValue = ] INPUT type=file.value Possible ValuessValue String that receives the file name value of an INPUT type=file control object. The property is read-only. The property has no default value.Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.Applies To INPUT type=file 已经说明了是只读的了。