2012-07-02 3 views
0

try1과 try2라는 두 개의 파일에 다음 코드가 있습니다.iframe의 내용을 강조 표시합니다.

1.try1.php

<html> 
<head> 
    <title></title> 
</head> 
<body style="height: 1000px"> 

    <iframe name="frametest" id="frameDemo" src="try2.php" style="height:  100%;width: 100%;z-index: 10"></iframe> 
</body> 
</html> 

2.try2.php

<html> 
<head> 
    <title></title> 
</head> 
<body> 
    <div> 
     <pre> 
       <?php echo  htmlentities(@file_get_contents("http://stackoverflow.com")); ?> 
     </pre>  
    </div> 

</body> 

내가 어떻게 try1.php에서 iframe이있는 모든 A HREF 링크를 강조 할 수 있습니까? 이 방법은 jquery bt로 수행 할 수 있다고 생각하십니까?

+0

당신이 SO 뱀프 건가요 사용할 수 있을까? – Shikiryu

답변

0

자바 스크립트 자체에, 당신은이 :

var aElement = document.getElementById('frameDemo').contentWindow.getElementsByTagName("a"); 
+0

이 작동하지 않습니다! – nir

관련 문제