+ 1
How can I create an alert box or swal alert by clicking a button
5 Réponses
+ 2
Follow these Steps
1. Make a html alert box using div tags and make an ok button inside it.
2. Make a function to hide and unhide the alert box
3. Attach that function to ok button using onclick attribute
ex :
https://code.sololearn.com/W6FnA55U6uDV/?ref=app
+ 2
+ 1
Thanks guys
0
I don't know about swal but I know alert using button clicking by javascrypt. Vary simple. Like this 👇.
Copy and paste your html file
<Button onclick="click ()">button name</name>
Copy and paste javascrypt file
Function click(){
Alert("your alert massege");
}