I want this kinda image for the following link
https://taskcluster-ui.herokuapp.com/worker-manager
You can use the native JS function confirm
, which produces a dialogue box similar to the alert
function. If ‘OK’ is pressed, it will return true
. Otherwise it returns false
. You can combine it with an if
statement to get the behaviour you require. See https://www.w3schools.com/jsref/met_win_confirm.asp for more.
However, styling the dialogue box involves writing the confirm
function from scratch according to https://stackoverflow.com/questions/7853130/how-to-change-the-style-of-alert-box. A better way to deal with this would be to use a library like SweetAlert https://sweetalert.js.org/.