JAVASCRIPT display message confirmation dialog box to inform whether wants to stay or leave current page javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

How to display a message in a confirmation dialog box to inform the user whether wants to stay or leave the current page in javascript ?


 24

JAVASCRIPT


0


<!DOCTYPE html>
<html>
<body onbeforeunload="return func()">

<a href="https://www.net-raft.com">Click here to go to net-raft.com</a>

<script>
function func() {
return "THIS IS YOUR TEXT ...";
}
</script>

</body>
</html> 


By     Created   
The power of the user (%)
6%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  5.1K     384

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  3K     259

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  1.7K     159

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  1.6K     119

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  1.5K     99

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  1K     82

get ip address javascriptget ip address javascriptJAVASCRIPT

Click to see more ...

  812     76

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  568     71

get filename using javascript get filename using javascript JAVASCRIPT

Click to see more ...

  550     61

how to create the connect to a database with ADODB using javascript ?how to create the connect to a database with ADODB using javascript ?JAVASCRIPT

Click to see more ...

  522     59