Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
js-d001
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Orlando Romero
js-d001
Commits
252c6c52
Commit
252c6c52
authored
Jun 14, 2018
by
roshka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agregue el archivo tateti
parents
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
118 additions
and
0 deletions
+118
-0
taTeti.html
+118
-0
No files found.
taTeti.html
0 → 100644
View file @
252c6c52
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
table
{
width
:
50%
;
margin-left
:
300px
;
:
}
tr
,
td
{
border
:
2px
solid
#000
;
padding
:
50px
;
}
</style>
<script
type=
"text/javascript"
>
var
a
=
"X"
;
var
c2
=
""
;
var
cont
=
1
;
var
mid1
=
"1"
;
var
mid2
=
"2"
;
var
mid3
=
"3"
;
var
mid4
=
"4"
;
var
mid5
=
"5"
;
var
mid6
=
"6"
;
var
mid7
=
"7"
;
var
mid8
=
"8"
;
var
mid9
=
"9"
;
function
capturar
(
a
){
b
=
a
;
}
function
clicks
(){
var
c1
=
document
.
getElementById
(
b
);
var
f1
=
document
.
getElementById
(
"mid1"
);
var
f2
=
document
.
getElementById
(
"mid2"
);
var
f3
=
document
.
getElementById
(
"mid3"
);
var
f4
=
document
.
getElementById
(
"mid4"
);
var
f5
=
document
.
getElementById
(
"mid5"
);
var
f6
=
document
.
getElementById
(
"mid6"
);
var
f7
=
document
.
getElementById
(
"mid7"
);
var
f8
=
document
.
getElementById
(
"mid8"
);
var
f9
=
document
.
getElementById
(
"mid9"
);
if
(
c1
!=
c2
){
if
(
a
==
"X"
)
{
a
=
"O"
;
}
else
{
a
=
"X"
;
}
c1
.
innerHTML
=
a
;
c2
=
c1
;
if
(
c1
==
f1
){
mid1
=
a
;
}
else
if
(
c1
==
f2
){
mid2
=
a
;
}
else
if
(
c1
==
f3
){
mid3
=
a
;
}
else
if
(
c1
==
f4
){
mid4
=
a
;
}
else
if
(
c1
==
f5
){
mid5
=
a
;
}
else
if
(
c1
==
f6
){
mid6
=
a
;
}
else
if
(
c1
==
f7
){
mid7
=
a
;
}
else
if
(
c1
==
f8
){
mid8
=
a
;
}
else
if
(
c1
==
f9
){
mid9
=
a
;
}
if
(
mid1
==
mid5
&&
mid1
==
mid9
){
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid1
==
mid2
&&
mid1
==
mid3
){
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid1
==
mid4
&&
mid1
==
mid7
)
{
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid2
==
mid5
&&
mid2
==
mid8
)
{
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid4
==
mid5
&&
mid4
==
mid6
)
{
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid3
==
mid5
&&
mid3
==
mid7
)
{
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid3
==
mid6
&&
mid3
==
mid9
)
{
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
if
(
mid7
==
mid8
&&
mid7
==
mid9
)
{
alert
(
"Has ganado(carga la pagina para jugarlo de nuevo)"
);
}
}
}
</script>
</head>
<body>
<table>
<tr>
<td
onclick=
"capturar('mid1'); clicks()"
id=
"mid1"
></td><td
onclick=
"capturar('mid2'); clicks();"
id=
"mid2"
></td><td
onclick=
"capturar('mid3'); clicks()"
id=
"mid3"
></td>
</tr>
<tr>
<td
onclick=
"capturar('mid4'); clicks()"
id=
"mid4"
></td><td
onclick=
"capturar('mid5'); clicks()"
id=
"mid5"
></td><td
onclick=
"capturar('mid6'); clicks()"
id=
"mid6"
></td>
</tr>
<tr>
<td
onclick=
"capturar('mid7'); clicks()"
id=
"mid7"
></td><td
onclick=
"capturar('mid8');clicks()"
id=
"mid8"
></td><td
onclick=
"capturar('mid9'); clicks()"
id=
"mid9"
value=
"mid9"
></td>
</tr>
</table>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment