Witam, czemu to nie dziala ? Prosze o wytlumaczenie jak mozna i poprawiony kod :)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="js.js"></script>
<link rel="stylesheet" type="text/css" href="css.css">
<title>Dokonam wyboru</title>
</head>
<body>
<div class="conteiner">
<input type="text" id="A">
<input type="text" id="B">
<input type="text" id="C">
<div class="clear"></div>
<button id="P" onclick="great();" >Kliknij, a powiem!</button>
<div id="odp"></div>
<div id="blad"></div>
</div>
</body>
</html>
function great()
{
var aa = document.getElementById("A").value;
var bb = document.getElementById("B").value;
var cc = document.getElementById("C").value;
if (aa >= bb || cc) /* || */
{
document.getElementById("odp").innerHTML=aa + " jest największe";
}
else if (bb >= aa || cc)
{
document.getElementById("odp").innerHTML=bb + " jest największe";
}
else
{
document.getElementById("odp").innerHTML=cc + " jest największe";
}
}
css nie potrzebny ale dodam
body
{
background-color: rgba(30,30,30,1);
margin: 0px;
}
button
{
margin: 15px 223px;
width: 200px;
height: 30px;
}
.conteiner
{
width: 650px;
margin: 50px auto;
}
.clear
{
clear: both;
}
#A
{
width: 200px;
margin: 0px 10px 0px 0px;
}
#B
{
width: 200px;
}
#C
{
margin: 0px 0px 0px 10px;
width: 200px;
}
#odp
{
margin: 15px 150px;
}