Skip to main content

Onload Popup in HTML

<html>
<head>
    <link rel="stylesheet" href="css/bootstrap.css" type="text/css" media="screen" />
</head>
<body>
  <div class="modal fade" id="myModal" style="padding-top:50px;">
    <div class="modal-dialog" >
        <div class="modal-content">
             <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h3><span>Description:</span></h3>
             </div>
             <div class="modal-body" id="myModal" align="center">
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
            </div>
             <div class="modal-footer">
             <a href="download.php" class="btn btn-primary">Download</a>
             </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript">
    $(window).load(function(){
        $('#myModal').modal('show');
    });
</script>
</body>
</html>

Comments

Popular posts from this blog

HTML 5 pattern validation

<!DOCTYPE html> <html> <head> <title>html5 patterns val</title> </head> <body> <form action=""> Email :   <input type="email" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" required> Min Char:  <input type="password" name="pw" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" required> Search: <input type="search" name="search" pattern="[^'\x22]+" title="Invalid input" required> Password:   <input type="password" name="pw" pattern=".{6,}" title="Six or more characters" required> Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three let...