0
您可以看到圖片和代碼。我怎樣才能使它像點擊可用按鈕時,它會將文本更改爲單擊它的帳戶的用戶名。單擊事件按鈕
<li>0 - 1 <button type="button" class="btn btn-primary" id="btnD" data-loading-text="Username">Available</button>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(function(){
$('#btnD').click(function(){
var btn = $(this);
btn.button('loading');
});
});
</script></li>
<li>0 - 2</li>
<li>0 - 3</li>