jQuery method fails on IE

前端 未结 2 642
别那么骄傲
别那么骄傲 2021-01-28 21:10

I have this method:

function replaceRightClickIcefacesMethod() {
    var oldName = jQuery(\".singlePaneOfGlassBlock\").attr(\"oncontextmenu\");
    oldName = old         


        
2条回答
  •  逝去的感伤
    2021-01-28 21:25

    I was able to get it as string instead of function (as it was in IE) like this:

    var oldName = jQuery(".singlePaneOfGlassBlock")[0].getAttributeNode("oncontextmenu").value;
    

提交回复
热议问题