Today I have learned Toast in javascript

  Toast in javascript:

Add the listener on Button and this Button will show a toast message. btn.setOnClickListener (new View.OnClickListener () {}); 2 Now, Create a toast message. The Toast.makeText () method is a pre-defined method which creates a Toast object. ... 3 Display the created Toast Message using the show () method of the Toast class. ...

  • To create a toast, take two divs with the class .toast-header, .toast-body and wrap them inside a with the class .toast, also give a unique id to this div. Then use this id to connect a button with toast that will trigger the toast. This article is about Bootstrap 5 Toasts. This is how a basic toast is created.
  •  </div>
        <div class="toast show">
        <div class="toast-header">
          <strong class="me-auto">Bootstrap</strong>
          <button type="button" class="btn-close" data-bs-dismiss="toast"></button>
        </div>
        <div class="toast-body">
          <p>Card,Input,Lable,Modal,Toast</p>
        </div>
        <div class="toast-footer">
            <button class="btn btn-warning" >close</button>
        </div>
      </div>
  •                           Output:

Comments

Popular posts from this blog

Building a Full-Stack Student Management System with React.js and NestJS

Today I have solved the problem in javascript

Today I have solved problem in javascript