<html>
<head>
<title>IP Adresse</title>
<style type="text/css">
input.inputs{
border:0px solid #ffffff;
height:22px;
font-family:Verdana;
font-size: 14px;
width:30px;
}
</style>
<script language="JavaScript" type="text/javascript">
var thisInput = new Array();
thisInput.push("IP1","IP2","IP3","IP4")
var IP ="";
function getIP()
{
IP="";
for(i=0;i<thisInput.length;i++)
{
var SelItem = thisInput[i];
if(document.getElementById(SelItem)!=null && document.getElementById(SelItem).value!=="")
{
if(SelItem!==thisInput[thisInput.length-1])
{
var ZmObj = " . ";
}
else
{
var ZmObj = "";
}
IP+=document.getElementById(SelItem).value + ZmObj;
}
}
document.getElementById("createIP").innerHTML=IP;
}
function checkValues(ObjID)
{
var thisValue = document.getElementById(ObjID).value;
if(thisValue.length == 3)
{
var ObjT = ObjID.split("IP");
var ObjZ =ObjT[1];
ObjZ++;
//alert(ObjZ);
document.getElementById("IP" + ObjZ).focus();
}
getIP();
}
</script>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="200" height="26">
<tbody>
<tr>
<td width="200" style="border:1px solid #cccccc;font-family:verdana;font-size:14px" height="26" valign="middle">
<input type="text" name="IP1" id="IP1" size="3" maxlength="3" onKeyUp="checkValues('IP1');" class="inputs"> .
<input type="text" name="IP2" id="IP2" size="3" maxlength="3" onKeyUp="checkValues('IP2');" class="inputs"> .
<input type="text" name="IP3" id="IP3" size="3" maxlength="3" onKeyUp="checkValues('IP3');" class="inputs"> .
<input type="text" name="IP4" id="IP4" size="3" maxlength="3" class="inputs" onKeyUp="checkValues('IP3');">
IP </td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="200">
<tbody>
<tr>
<td width="75" style="border:1px solid #cccccc;font-family:verdana;font-size:12px">
Deine IP:
</td>
<td width="125" id="createIP">
</td>
</tr>
</tbody>
</table>
</body>
</html>