如果我单击超链接,则必须显示“浏览窗口"超链接 [英] If i click hyperlink Called Attach file than the Browse Window have to appear

查看:107
本文介绍了如果我单击超链接,则必须显示“浏览窗口"超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为附加文件"的超链接.如果我单击该超链接附加文件",则必须显示浏览窗口.任何人都可以帮助我做到这一点吗

I am having a hyperlink called Attach file .If i click on that hyperlink "Attach File" than the browse window should have to appear .Can any one help me to do this

推荐答案

添加此javascript函数.
Add this javascript function.
function clickfp() {
    var objFp = document.getElementById(''<%= fpUpload.ClientID %>'');
    objFp.click();
}


在超链接onclick上调用javascript函数.


Call javascript function on hyperlink onclick.

<input type="file" id="fpUpload" runat="server" name="filediag" style="display:none" />
   <asp:HyperLink ID="hlClick" runat="server" Text="Upload" onclick="clickfp();"></asp:HyperLink>


使用窗口 [onclick事件中,="=" http://www.w3schools.com/jsref/obj_window.asp"target =" _ blank"title =" New Window> ^ ]对象,使用href="#".或像往常一样简单地使用href并添加target="_blank",但是您将无法控制窗口.
顺便说一下,必须出现"尚不清楚,因为单击链接必须可见...
Use the Window[^] object in JavaScript, in an onclick event of the link, with href="#". Or simply use the href as normally, and add a target="_blank", but you will have no control over the window.
By the way "should have to appear" is unclear since it has to be visible to click on a link...


这篇关于如果我单击超链接,则必须显示“浏览窗口"超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆