English 中文(简体)
• 如何显示文件浏览器,点击案文,并在对案文进行 h变时将其变换成点
原标题:How to display file browser from click on text and have mouse cursor change to pointer when hovering text

当用户点击我网页上的一个链接时,我试图显示一个档案选择器。 我只看一线,但还没有找到完整的解决办法。

我排除了一名听众对我的链接点击事件的约束力,并模拟了我表格档案现场的点击事件,因为我已经读过,Sato确实不支持从方案上点击投入[类型=文件]。

目前,我正在采用这样一种做法,即我把档案场的不透明性确定为零,把档案放在顶端,从而有效地拦截任何点击该链接。 问题在于,当用户的 cur子over倒链接时,我可以 figure出一种改变的方法,因为档案材料掩盖了这一联系,而档案材料不允许这种搭配。 我给所有直系亲属都提供了风格的曲线:指点器,但还没有uck。

Does anyone have an idea of a different approach I could take in order to get the cursor to change to a pointer on hover of my link? Is my best bet going to be going with something like they have at http://www.uploadify.com/?

http://www.ohchr.org。

To explain a little better, I have this file input on my page:

<div class="logo_file">
    <input id="logo_file_field" type="file">
</div>

这里有:

.logo_file {
    position: absolute;  /* this element s parent has position: relative */
    top: -65px;
    left: 0;
    width: 175px;
    overflow: hidden;
    cursor: pointer;
}
input#logo_file_field {
    opacity: 0;
    -moz-opacity: 0;
    filter: alpha(opacity=0);
    cursor: pointer;
}

而当用户点击这一链接时,我试图显示与该领域相应的档案选择人:

<div class="logo_link_wrap">
    <a id="logo_change_link">Change Photo</a>
</div>

如果有:

.logo_link_wrap {
    margin-top: 38px;
    cursor: pointer;
}

现在 我把看不见的档案放在这个链接上,但是,当你把一个环节 h倒时, cur子并没有变成像你那样的点子。 档案选择人确实显示,这实际上只不过是 cur子不改变,而把我搁置起来。 增 编

问题回答

The problem is that you are placing the input field over the link and making the input field invisible by using opacity:0;. But the input field is still there and is blocking the cursor access to the link. Would it not be better to replace the opacity with display:none?

<代码> 显示:none, 您隐藏输入领域,将其从流量中删除。 我假定,你想要利用这一联系来积极发挥投入领域的上载功能,我也假设你知道如何这样做。

在一个主轴中总结投入标记

<a href="#"><input type="file" ... /></a> 




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签