Switching turns in JavaScript Tic-Tac-Toe? -


i've got this, ideas of how can program switch turns between players it?

add below if(haswon) clause:

var turnbtn = document.getelementbyid('turn'); turnbtn.value = (turnbtn.value == "x") ? "o" : "x"; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -