window.event javascript code does not work in Firefox

前端 未结 2 1581
你的背包
你的背包 2021-01-28 22:02

I have an markup

            
2条回答
  •  灰色年华
    2021-01-28 22:29

    try this:

    Tested and 100% working

    You can Combine here event and this(element)

    function postBackByObject(e,d) {
                var target = e.target || e.srcElement;     // Support IE6-8
    
                if (d.id == 'uploadControl') {
    
                    document.getElementById('labelId').click();
                }
                target.cancelBubble = true;
            }
    
    
    

提交回复
热议问题