<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script>
$("button").click(function () {
alert("funny");
var $btn = $(this);
$btn.button('loading');
// Then whatever you actually want to do i.e. submit form
// After that has finished, reset the button state using
setTimeout(function () {
$btn.button('reset');
}, 1000);
});
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">@</span>
<asp:TextBox ID="TextBox1" runat="server" Text="1" class="form-control" placeholder="Username" aria-describedby="basic-addon1"></asp:TextBox>
</div>
<asp:Button ID="Button1" runat="server" Text="Button" class="btn btn-default" OnClick="Button1_Click" />
<asp:Label ID="Label1" runat="server" ></asp:Label>
</form>
<button type="button" data-loading-text="Loading..." class="btn btn-primary">
Loading state
</button>
</body>
</html>
这是我的简单代码.. 我已经确认jquery应该首先加载然后加载..仍然没有加载