我刚刚在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>