日期:2014-05-17  浏览次数:20461 次

当把鼠标移到 form表单中的submit按钮上,IE左下角会显示action地址,怎么用javascript模拟这个过程呢?
<form action="../upload/UploadFileHandler.ashx" onsubmit = "RequestProgress();" method="post" id="uploadform" target = "frameFileUpload" enctype="multipart/form-data">
<table cellpadding="0" cellspacing="0" border="0">
  <tr>
  <td style="width:20%;height:30px">选择文件:&nbsp;</td>
  <td id="uploadtd" style="height:25px;width:300px"><input type="file" id="fileUpload" name="fileUpload" /></td>
  <td><input type="submit" value="上传" style="font-size:9pt;height:25px;width:60px" id = "submit" /></td>
  </tr>
  <tr>
  <td style="width:20%;height:20px">&nbsp;</td>
  <td id="pbtd" style="height:20px;width:300px"><div id="progressBar" style="height:10px;width:300px;"></div></td>
  <td id="pvtd"><label id="progressValue"></label></td>
  </tr>
  <tr><td colspan="3"><iframe id="frameFileUpload" name="frameFileUpload" style="display:none;" ></iframe></td></tr>
</table>
</form>

------解决方案--------------------
onmouseover="window.status='upload/UploadFileHandler.ashx'"

现在浏览器有设置,是否允许使用脚本来更新状态栏
------解决方案--------------------
实际form的action就是一个带有参数传递的a链接(你查看get的方式就很明显)。。。。
如果不你想让人看到action地址,你可以自己改变浏览器状态栏显示的值。或者写一个function指定好action的值再submit上去。
有见过用JS自己拼form的。