Código HTML:
<script> function marcar(){ //El Try es para evitar caidas si el elemento no existe try{ document.getElementById('check' + document.getElementById('ID').value).checked=true; }catch(e){ } } $("input#ID").remove(); </script> <script> function disable_enter(e){ var key; if(window.event){ key = window.event.keyCode; } else{ key = e.which; } if(key == 13){ marcar(); document.getElementById('ID').value =''; //limpiar input //document.getElementById('ID').select(); // Seleccionar texto return false; } else{ return true; } } </script>
Código HTML:
<form id="form1" name="form1" method="POST" > <label style="font-size:14px">ID: <input type="text" name="ID" id="ID" onKeyPress="return disable_enter(event)"> </label> <label> <input type="button" name="buscar2" value="Buscar" onClick="marcar();" /> </label> </form>
esta es mi tabla:
Código HTML:
<table border="0" class="normal"> <td>ID</td> <td>Estado</td> <?php do { ?> <tbody> <tr> <td ><?php echo $row['ID']; ?></td> <input name="aplica[]" value="<? echo $row ['ID'];?>" type="checkbox" <?php if($row ['ID'] == $_POST['ID']) echo "checked='checked' "; ?> id="check<? echo $row ['ID'];?>" class="check" /></td> </tbody> <?php } while ($row= mysql_fetch_assoc($row)); ?> Bien ahora tengo que mostrar la hora en que fue buscado el ID <input name="hora[]" value="" type="text" /></td>
He leido como obtener la fecha y hora... lo que no tengo idea es como capturar la hora por cada busqueda es decir cuando mi check se marque
Gracias de antemano