Сообщение от AntonMs
|
проверить пустой ли тег body который внутри его
|
Как вариант...
tmp.html
<!DOCTYPE html>
<html>
<head>
<!--
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
<link rel='stylesheet type=text/css href=tmp.css' />
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
function test(){
var val=frames[0].document.body.innerHTML;
alert(val);
};
</script>
</head>
<body>
<iframe src='tmp1.html'></iframe>
<button onclick='test();'>Test</button>
</body>
</html>
tmp1.html
<!DOCTYPE html>
<html>
<head>
<!--
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
<link rel='stylesheet type=text/css href=tmp.css' />
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
</script>
</head>
<body>
<p>Test</p>
</body>
</html>