I recommend looking for the size on the official website to assign width/height
its iframe
it automatically gets right, you can put it if you want the link of the various games, that my opinion is better to do this DOM Expert. (Study DOM Intermediate).
Demo:
link
Follow the code below (costly to do DOM rss):
<html>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script><iframename="ballswar" src width height scrolling="no" frameborder="0">
<p>Your browser does not support iframes.</p>
</iframe>
<script>
$(document).ready(function() {
var cors = "https://crossorigin.me/";
var jogo = "http://ballswargame53.bitballoon.com/index.html";
$.ajax({
url: cors+jogo,
type: "GET",
dataType: "Html",
success: function(obj) {
objtemp = $.parseHTML(obj);
$("iframe[name=ballswar]")
.attr('src', jogo)
.attr('width', $(objtemp).find('canvas')[0].width)
.attr('height', $(objtemp).find('canvas')[0].height)
}
});
});
</script>
</html>
This address https://crossorigin.me/
is a CORS, in case the site security is denied to download the code to deliver AJAX and should use CORS is the FACT. Find out about CORS ( link )