2010-07-14 4 views
1

는 다음 코드에 jQuery를 동등한 것이 무엇인지 알아 내려고 노력하고 있어요 :이러한 javascript DOM 객체/메소드에 해당하는 jQuery는 무엇입니까?

var temp = $('#logoutFrame2').contents().find('html').html(); 

try { 
    var temp1 = document 
        .getElementById('logoutFrame2') 
        .contentWindow 
        .document 
        .getElementById('theCBOBox').innerHTML; 
} 
catch(err){} 

var newdiv = document.createElement("div"); 
newdiv.innerHTML = temp; 
var container = document.getElementById("theContacts"); 
container.appendChild(newdiv); 

어떤 도움이 좋을 것! : O)

데이비드

+1

.......하지만 왜? –

+0

이 코드의 어느 부분을 jquery로 변경 하시겠습니까? – Zsolti

+0

나는 이미 그 일을했기 때문에 그것 모두는 임시 변수를 기대합니다. – StealthRT

답변

1
var temp = $('#logoutFrame2').contents().find('html').html(); 

    try { 
     var temp1 = document 
         .getElementById('logoutFrame2') 
         .contentWindow 
         .document 
         .getElementById('theCBOBox').innerHTML; 
    } 
    catch(err){} 

    var newdiv = document.createElement("div"); 
    newdiv.innerHTML = temp; 
    var container = document.getElementById("theContacts"); 
    container.appendChild(newdiv); 

var temp = $('#logoutFrame2').contents().find('html').html(); 

    try 
    { 
     var temp1 = $('#logoutFrame2')[0].contentWindow.document.getElementById('theCBOBox').innerHTML; 
    } 
    catch(err){} 

    $('#theContacts').append('<div>'+temp+'</div>'); 

즐기로 변환!

+0

그게 효과가있어, Bogdan : 오) 고마워! – StealthRT

관련 문제