2010-06-11 71 views
0

我在使用lightbox时遇到了一个奇怪的问题。灯箱在输入时多次打开

凡是使用新灯箱的用户都可以在相同的页面数上打开相同的灯 。对于e.g

Using tab button go to `Lightbox link`. 
Press enter --> Light box will open. 
Press enter --> second light box open below the previous one. 
and so on....... 

当我使用标签时出现的问题和环节上输入我的重点是没有得到从链接改变,因此用户能够打开点击enter多个收藏夹。

我尝试以下,但它不是为我工作

<a href = '/calenders/add_shipment' onclick ="this.blur()" class='lbOn'> 
    <img src='/images/box-plus.png' style='border:none;'> 
</a> 

应该怎样我接近摆脱这种。

+0

我用隐藏文本框中的设置焦点完成它。 'document.getElementById('set_focus')。focus();' – Salil 2010-06-11 11:45:38

回答

0

我使用隐藏文本框中的设置焦点完成了它。如下

<script type="text/javascript" language="JavaScript"> 
    document.getElementById('set_focus').focus(); 
</script> 

<div style="display:none;"><input type="text" size="20" id="set_focus"/></div>