esatto!
prova e riprova ho messo 4 input in una tabella mettendo il bordo alla tabella e togliendolo ai singoli input il risultato e' quello che volevo..graficamente
Codice PHP:
<html>
<head>
<title>INPUT SOLO NUMERICA</title>
<style type="text/css">
.myIn{
border:0px;
width:30px;
margin:0px;
}
.mytable{border-top: 1px solid buttonshadow;
border-left: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
border-bottom: 1px solid buttonshadow;
border-color:#7F9DB9;
margin: 0px;
}
</style>
<script type="text/javascript">
var keyPressed = 0;
function onlynum(e){
myIn_a = document.getElementById('myInput_a');
if(((e.keyCode>47)&&(e.keyCode<58))||((e.keyCode>95)&&(e.keyCode<106))||(e.keyCode==8)||(e.keyCode==9)||(e.keyCode==116)||((e.keyCode>36)&&(e.keyCode<41))){
if(((e.keyCode>47)&&(e.keyCode<58))||((e.keyCode>95)&&(e.keyCode<106))){
}
}else
return false;
}
window.onload = function(){
myIn_a = document.getElementById('myInput_a');
myIn_b = document.getElementById('myInput_b');
myIn_c = document.getElementById('myInput_c');
myIn_d = document.getElementById('myInput_d');
myIn_a.value="";
myIn_b.value="";
myIn_c.value="";
myIn_d.value="";
myIn_a.focus();
}
</script>
</head>
<body>
<table bordeR="0" cellspacing="0"class="myTable"><tr><td>
<input class = "myIn" type="text" id="myInput_a" maxlength="3" onkeydown="return onlynum(event);" /> .
<input class = "myIn" type="text" id="myInput_b" maxlength="3" onkeydown="return onlynum(event);" /> .
<input class = "myIn" type="text" id="myInput_c" maxlength="3" onkeydown="return onlynum(event);" /> .
<input class = "myIn" type="text" id="myInput_d" maxlength="3" onkeydown="return onlynum(event);" />
</td></tr></table>
</body>
</html>
a questo punto vorrei che il cursore stia al centro del singolo input anche mentre scrivo dentro i numeri....qualche idea?