xxxxxxxxxx
// Alert displays a little pop-up on the top of the screen
alert("myMessage");
xxxxxxxxxx
function myFunction(time)
{
alert('time starts now');
//code to make the program wait before continuing
alert('time is up')
}
xxxxxxxxxx
swal("Write something here:", {
content: "input",
})
.then((value) => {
swal(`You typed: ${value}`);
});
xxxxxxxxxx
/*
* @title {String or DOMElement} The dialog title.
* @message {String or DOMElement} The dialog contents.
* @onok {Function} Invoked when the user clicks OK button or closes the dialog.
*
* alertify.alert(title, message, onok);
*
*/
alertify.alert('Alert Title', 'Alert Message!', function(){ alertify.success('Ok'); });
xxxxxxxxxx
/*
* @message {String or DOMElement} The dialog contents.
* @onok {Function} Invoked when the user clicks OK button or closes the dialog.
*
* alertify.alert(message, onok);
*
*/
alertify.alert('Alert Message!', function(){ alertify.success('Ok'); });
xxxxxxxxxx
/** onTokenRefresh() and FirebaseInstanceIdService are deprecated.
This call is also deprecated FirebaseInstanceId.getInstance().getToken()
Instead, You should override onNewToken(String token) in FirebaseMessagingService. This method triggered when the token is changed. Once you override this method, you can safely remove FirebaseInstanceIdService whcih contains onTokenRefresh().
When token can change?
App deletes Instance ID
App is restored on a new device
User uninstalls/reinstall the app
User clears app data
How to retrieve the current token:
by calling FirebaseInstanceId.getInstance().getInstanceId():
**/
FirebaseInstanceId.getInstance().getInstanceId()
.addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
@Override
public void onComplete(@NonNull Task<InstanceIdResult> task) {
if (!task.isSuccessful()) {
Log.w(TAG, "getInstanceId failed", task.getException());
return;
}
// Get new Instance ID token
String token = task.getResult().getToken();
// Log and toast
String msg = getString(R.string.msg_token_fmt, token);
Log.d(TAG, msg);
Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();
}
});
xxxxxxxxxx
const testing = () => {
const inputValue = document.getElementById("inputField").value;
alert(inputValue);
}
xxxxxxxxxx
"Not Found"