-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.js
More file actions
31 lines (28 loc) · 736 Bytes
/
interface.js
File metadata and controls
31 lines (28 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
ChessBoard Interactive Frontend Program HTML
Written By: Kshitij Tomar
*/
const computerButton = document.querySelector('#btn1')
const playerButton = document.querySelector('#btn2')
function onButtonClick()
{
const check = document.getElementById('pvp')
if (!check)
{
const newScript = document.createElement('script')
newScript.src = '2Player.js'
newScript.id = 'pvp'
document.body.appendChild(newScript)
}
}
function onClick()
{
const check = document.getElementById('comp')
if (!check)
{
const newScript = document.createElement('script')
newScript.src = 'Computer.js'
newScript.id = 'comp'
document.body.appendChild(newScript)
}
}