Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html popup

<!---Source https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwi_9fra1In4AhWSi1wKHVv9DYgQFnoECAkQAQ&url=https%3A%2F%2Fwww.w3schools.com%2Fhowto%2Fhowto_js_popup.asp&usg=AOvVaw3rwwTiE5ErlsOMP1mJdRCL --->

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* Popup container - can be anything you want */
.popup {
  position: relative;
  display: inline-block;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* The actual popup */
.popup .popuptext {
  visibility: hidden;
  width: 160px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -80px;
}

/* Popup arrow */
.popup .popuptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Toggle this class - hide and show the popup */
.popup .show {
  visibility: visible;
  -webkit-animation: fadeIn 1s;
  animation: fadeIn 1s;
}

/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
  from {opacity: 0;} 
  to {opacity: 1;}
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity:1 ;}
}
</style>
</head>
<body style="text-align:center">

<h2>Popup</h2>

<div class="popup" onclick="myFunction()">Click me to toggle the popup!
  <span class="popuptext" id="myPopup">A Simple Popup!</span>
</div>

<script>
// When the user clicks on div, open the popup
function myFunction() {
  var popup = document.getElementById("myPopup");
  popup.classList.toggle("show");
}
</script>

</body>
</html>
Comment

javascript popup form

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#editCat">
  Launch demo modal
</button>

<div class="modal"  id="editCat"  >
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content" >
            <div class="modal-header">
             <!--head-->
            </div>
            <div class="modal-body"  >
                <form #editform="ngForm" id="editform" (ngSubmit)="onEditFormSubmit(editform)">
                    <div class="form-group">
                        <label for=""><h4 style="color:  #124f67;">Catagory Name: </h4></label>

                        <input required type="text" id="edit" ngModel name="name" placeholder="Change Catagory Name" class="form-control">
                        <button class="btn "  type="button" (click)="addSubCatagory()">Add_Sub_Catagory</button>          
                    </div>
                    
                </form>

                
            </div>
            
        </div>
    </div>
</div>
Comment

popup html

<div id="form-booking-call">
    <div class="popup">
        <div class="popup__overlay"></div>
        <div class="popup__wrap">
            <div class="popup__close">
            <svg style="width:16px" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
                <path d="M15.4905 15.4905C15.3294 15.652 15.1379 15.7802 14.9272 15.8676C14.7165 15.955 14.4905 16 14.2624 16C14.0342 16 13.8083 15.955 13.5976 15.8676C13.3868 15.7802 13.1954 15.652 13.0342 15.4905L7.99963 10.456L2.96504 15.4905C2.63931 15.8163 2.19753 15.9993 1.73688 15.9993C1.27623 15.9993 0.834449 15.8163 0.508721 15.4905C0.182992 15.1648 0 14.723 0 14.2624C0 14.0343 0.0449253 13.8084 0.132212 13.5977C0.219498 13.387 0.347436 13.1955 0.508721 13.0342L5.54331 7.99963L0.508721 2.96504C0.182992 2.63931 0 2.19753 0 1.73688C0 1.27623 0.182992 0.834449 0.508721 0.508721C0.834449 0.182992 1.27623 0 1.73688 0C2.19753 0 2.63931 0.182992 2.96504 0.508721L7.99963 5.54331L13.0342 0.508721C13.1955 0.347436 13.387 0.219498 13.5977 0.132212C13.8084 0.0449253 14.0343 0 14.2624 0C14.4905 0 14.7163 0.0449253 14.9271 0.132212C15.1378 0.219498 15.3293 0.347436 15.4905 0.508721C15.6518 0.670005 15.7798 0.861477 15.8671 1.07221C15.9543 1.28293 15.9993 1.50879 15.9993 1.73688C15.9993 1.96497 15.9543 2.19083 15.8671 2.40156C15.7798 2.61229 15.6518 2.80376 15.4905 2.96504L10.456 7.99963L15.4905 13.0342C16.1525 13.6962 16.1525 14.8111 15.4905 15.4905Z" fill="#CF2144"/>
            </svg>
            </div>
            <!-- Form Booking -->
            <div class="popup__item" data-popup ="1">    
                <div class="appointment__form form--style-full">
                    <div class="form__banner"><img src="<?= THEME_DIR_URI; ?>/assets/images/logo-form.png" alt=""></div>
                    <div class="form__title">Đặt lịch hẹn</div>
                    <form id="appointment__form" method="POST">
                        <div class="form__main">
                            <div class="form__name grid form-control">
                                <label for="appointment__name">Họ và tên: <sup>(*)</sup></label>
                                <input id="appointment__name" name="name" type="text" class="form_name"
                                    placeholder="Nhập thông tin">
                            </div>
                            <div class="form__phone grid form-control">
                                <label for="appointment__phone">SĐT: <sup>(*)</sup></label>
                                <input id="appointment__phone" name="phone" type="text" class="form_phone"
                                    placeholder="Nhập thông tin">
                            </div>
                            <div class="form__service grid form-control">
                                <label for="appointment__service">Dịch vụ: <sup>(*)</sup></label>
                                <select id="appointment__service" class="danh-sach-dich-vu">
                                    <option value="0">Chọn dịch vụ</option>
                                </select>
                            </div>
                            <div class="form__location grid form-control ">
                                <label for="store_booking">Đia chỉ: <sup>(*)</sup></label>
                                <input id="store_booking" value="Chọn chi nhánh" name="store_booking" type="text" class="btn_popup" data-popup="3">
                            </div>
                            <div class="form__time grid form-control ">
                                <label for="time_booking">Ngày/ Giờ: <sup>(*)</sup></label>
                                <input id="time_booking" value="Chọn thời gian" name="time_booking" type="text" class="btn_popup" data-popup="4">
                                <span class="hidden">10:20</span>
                                <input type="hidden"  name="">
                            </div>
                            <div class="form__note grid form-control">
                                <label for="appointment__note">Ghi chú:</label>
                                <input id="appointment__note" name="note" type="text" class="" placeholder="Nhập thông tin">
                            </div>
                        </div>
                        <button  id="appointment__btn" class="button btn--style">Xác nhận</button>
                        <div class="row" style="padding-top: 10px;">
                            <div class="result col-12" style="display: none; text-align: center;"></div>
                        </div>
                    </form>
                </div>
            </div>       
     
        </div>
    </div>
</div>
Comment

html popup form


<html>
<body>


<p>Here we use the prompt() method for Popup Forms</p>

<button onclick="popupfunction()">Click</button>

<p id="popup"></p>

<script>
function popupfunction() {
  let person = prompt("Please enter your name", "");
  if (person != null) {
    document.getElementById("popup").innerHTML =
    "Hello " + person + "!";
  }
}
</script>

</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: learn how to program html 
Html :: what is the code element in html 
Html :: underline text html 
Html :: entrata alerts 
Html :: Spaces not showing as I typed HTML 
Html :: tooltip in html 
Html :: u tag in html 
Html :: vue pick 20 items from array 
Html :: emmet edit true or false sublime text 
Html :: njk if 
Html :: href open in new tab 
Html :: bootstrap 4 flex 
Html :: nativescript router navigate 
Html :: mobile screen ful width not get in html 5 
Html :: capture image 
Html :: html select default message 
Html :: puppeteer html custom attribute 
Html :: html container farbverlauf 
Html :: HTML5 Video tag not working Safari iPhone iPad video webpage supported 
Html :: password setCustomValidity html5 
Html :: add title attribute 
Html :: html frame 
Html :: disabled button by attr 
Html :: git origin vs remote 
Html :: best background color in html 
Html :: remove active class from all li javascript 
Html :: code highlighter html 
Html :: how to run a html code in visual studio 
Html :: negrit html 
Html :: textbox readonly 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =