Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script> function initialize() { var mapProp = { center: new google.maps.LatLng(51.508742,-0.120850), zoom:7, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); } function loadScript() { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "../../maps.googleapis.com/maps/api/jskeyaizasydy0kkjitpvd2u7atoawhc9ysh6ohxoiymsensorfal~1"; document.body.appendChild(script); } window.onload = loadScript; </script> </head> <body> <div id="googleMap" style="width:500px;height:500px;"></div> </body> </html>
Result:
W3Schools.com - Try it yourself