Nadam se da ovo resava tvoj problem.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript">
function upisiIme()
{
var mesec1=document.form1.mesec.value;
if(mesec1=="01")
{
document.form1.ime.value="Januar";
return true;
}
else if(mesec1=="02")
{
document.form1.ime.value="Februar";
return true;
}
else if(mesec1=="03")
{
document.form1.ime.value="Mart";
return true;
}
else if(mesec1=="04")
{
document.form1.ime.value="April";
return true;
}
else if(mesec1=="05")
{
document.form1.ime.value="Maj";
return true;
}
else if(mesec1=="06")
{
document.form1.ime.value="Jun";
return true;
}
else if(mesec1=="07")
{
document.form1.ime.value="Jul";
return true;
}
else if(mesec1=="08")
{
document.form1.ime.value="Avgust";
return true;
}
else if(mesec1=="09")
{
document.form1.ime.value="Septembar";
return true;
}
else if(mesec1=="10")
{
document.form1.ime.value="Oktobar";
return true;
}
else if(mesec1=="11")
{
document.form1.ime.value="Novembar";
return true;
}
else if(mesec1=="12")
{
document.form1.ime.value="Decembar";
return true;
}
else
{
alert("Niste dobro uneli broj meseca. (npr. 01,02...) ");
form1.mesec.value="";
form1.mesec.focus();
return false;
}
}
</script>
</head>
<body>
<form name="form1" method="post" >
<p>
<input type="text" name="mesec">
TekstMesec
</p>
<p>
<input type="text" name="ime">
TekstIme
</p>
<p>
<input type="button" name="Submit" value="Submit" onClick="return upisiIme()">
</p>
</form>
</body>
</html>
|