2014-11-04 3 views
0

javascript에서 getattribute를 사용하고 Internet Explorer 11에서 작동하지 않습니다. getattribute에 해당하는 항목이 있습니까? 아래 코드는 내 코드입니다.javascript getattribute issues IE 11

코드 : -

var innerFrames = currentRow.all.tags("iframe"); 

if(innerFrames.length > 0) 
{ 
    var currentFrame = innerFrames[0]; 
    var frmID = currentFrame.getAttribute("id"); 
    var ownerID = currentFrame.getAttribute("displayID"); 
} 
var sGroupCaption = (currentFrame.getAttribute("Caption") == null) ? "" : currentFrame.getAttribute("Caption"); 

if (currentFrame.getAttribute("isEmpty")!= null){ } 

    var Type = (currentFrame.getAttribute("displayType") == null) ? "" : currentFrame.getAttribute("displayType"); 

pls는 내가에 javscript에

감사

답변

0

당신은 다음과 같은 속성에 직접 액세스 할 수 있습니다이의 getAttribute replcae 수 있는지에 제안 :

  • currentFrame.myProperty
  • currentFrame [ "myProperty은"]
+0

안녕하세요, 당신은 VAR ownerID = currentFrame.getAttribute ("DisplayID 표시")을 의미하는 단계; var ownerID = currentFrame으로 작성할 수 있습니다. [ "displayID"]; 이게 무슨 말인지 알 겠어. 및 (currentFrame.getAttribute ("Caption") == null)은 (currentFrame [ "Caption"] == null)로 작성할 수 있습니까? –

+0

displayID 특성에 액세스하려는 경우 ... var ownerID = currentFrame.displayID –

+0

for (currentFrame.getAttribute ("Caption") == null)은 (currentFrame.Caption == null)와 같이 작성할 수 있습니까? –