Try out this code segment is as following,
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Open web page in IFrame</title>
</head>
<body>
<input type="button" value="click"/>
<iframe id="myiFrame" data-src="http://www.google.com" src="about:blank">
</iframe>
</body>
</html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">
$("button").click(function(){
$("iframe").each(function(){
$(this).attr("src", $(this).data("src"));
});
});
</script>