There are a few things to change a little with your code. Some corrections need to be made to your HTML so that the livedead span is not defined inside the opening <button> tag.
Also, disabling a button with javascript is done by setting the disabled field on that buttons Node object (ie not by setting innerHTML to disabled).
I would suggest a few changes to your code - the key one being to use the MouseEvent object.
In your case, this would simplify disabling the button that your user is clicking. To illustrate the use of the MouseEvent object, consider this code:
var currentTurn = 1;
// add a parameter to function to give us access to the event
// for this click interaction
function taketurn(event){
// if click count is 5 or more, then disable this button
if(currentTurn >= 5) {
// we access the button via the event parameter that we
// passed in. The currentTarget represents the button, so
// we can set disabled on the button to disable it.
event.currentTarget.disabled = 'disabled'
}
currentTurn ++;
document.getElementById("turn").innerHTML = currentTurn;
}
<div class="container">
<h1>turn <span id="turn">1</span></h1>
<!-- pass event defined for the click interaction, to taketurn() -->
<button onclick="taketurn(event)" type="button" class="btn btn-lg btn-info" id="livedead"> next</button>
<button onclick="taketurn()" type="button" class="btn btn-lg btn-info" disabled> next</button>
</div>
livedeadis the id the<span>in your HTML, sodocument.getElementById("livedead")gets thespan, not thebutton. You need to select the button. After that, you need to usecreateattributeto add thedisabledattribute.innerHTMLreplaces all the inner HTML, so literally would just show the text "disabled"button.