JSFiddle - React, Tailwind, and code Playground
by iskeltan
HTML
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.8.0.min.js" type="text/javascript"></script>
<script>
$(function(){
var $durum = 0;
var $buton = 0;
$("form *").keyup(function(){
$durum = 1;
});
$('input[type="sumbit"]').click(function(){
$buton = 1;
});
if($buton === 0){
setInterval(function(){
if($durum == 1){
$(window).bind("beforeunload", function(){
return "emin misin?";
});
};
}, 100);
};
});
</script>
</head>
<body>
<a href="http://blog.ahmetyavuzturk.com.tr" title="my site">my site</a><br>
<hr>
<form method="POST" action=".">
<input type="text" name="username" placeHolder="User name" /><br />
<input type="password" name="password" placeHolder="Password" /><br />
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>