pop-ups JavaScript

In this example below you will see how to do a pop-ups JavaScript with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 01luisrene, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 01luisrene ©
  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>pop-ups JavaScript</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <button id="botonWindowOpen">Abrir pop-up</button>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/01luisrene/pop-ups-javascript-Vjpxpy */
button{
  padding: 10px 30px;
  font-size: 4em;
  color: #006432;
  margin-top: 50px;
  margin-left: 100px;
}
@media (max-width: 699px){
  button{
    padding: 10px 30px;
    font-size: 2em;
    color: #006432;
    margin-top: 10px;
    margin-left: 10px;
  }
}

/*Downloaded from https://www.codeseek.co/01luisrene/pop-ups-javascript-Vjpxpy */
  function window_open(url){
   window.open( "http://01luisrene.com", "nombrePop-Up", "width=380,height=500, top=85,left=50");
  }
	document.getElementById("botonWindowOpen").onclick = function() {window_open()};

Comments