注册 登录
编程论坛 ASP技术论坛

[求助]文字链接执行隐藏iframe中input=file

thbwn 发布于 2008-06-09 11:45, 1512 次点击
说明:iframe是隐藏的,点击文字链怎样才能直接实现点input=file中浏览的效果,可以选文件。
请给个例子。
1 回复
#2
zhangyao32872008-06-09 13:07
<script language="javascript">function showlay(str){str.style.visibility="visible"}</script>

<a href="javascript:showlay("upload")">上传</a>

              <div id="upload" style="position:absolute; width:20; height:20; z-index:1; visibility: hidden">
                <div id="Show" style="position:absolute; width:301px; height:60px; z-index:1; left: -2px; top: -6px; background-color: #d6d3ce; layer-background-color: #d6d3ce; border: 1px none #000000">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="25"><iframe src="upfile.asp?filds=t10&act=小图" scrolling="no" topmargin="0" width="100%" height="60" marginwidth="0" marginheight="0" frameborder="0" align="center"></iframe></td>
                    </tr>
                  </table>
                </div>
              </div>
1