Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个,关于如何让程序在玩家之间切换回合的任何想法?
在你的 if(hasWon) 子句下面添加这个:
var turnBtn = document.getElementById('turn'); turnBtn.value = (turnBtn.value == "X") ? "O" : "X";