Я только что нашел пример кода на сайте jsbin.
Эта кнопка работает отлично, но без каких-либо действий с формой.
Что я мог с этим поделать?
<!DOCTYPE html> <html> <head> <script> function abc(this1) { this1.disabled=true; this1.innerHTML='<i class="glyphicon glyphicon-heart"></i> Sending Love…'; } </script> <script src="https://code.jquery.com/jquery.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <script src="https://code.jquery.com/jquery-1.11.3.js"></script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <form action="dfdsfs.php" method=post> <button type="submit" id="id1" class="btn btn-primary" onclick="abc(this);" > Send Love</button> </form> </body> </html>