You are on page 1of 3

<!

--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Lenguajes de Programación</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


<script type="text/javascript" language="javascript">
function validar()
{

var cadena=new String();


cadena=document.getElementById("txtnombre").getAttribute("value");
alert(cadena.length);

function actualizar()
{
var a = new Array();
a.push(1,2);
document.write('[' + a + ']<br>');
a.pop();
document.write('??m0?A????????¾[' + a + ']<br>');
a.push(3);
document.write('[' + a + ']<br>');
a.pop();
document.write('[' + a + ']<br>');
a.push([4,5]);
document.write('[');
for(var i = 0; i < a.length; i++){
if(typeof a[i] === 'object'){
document.write('[' + a[i] + ']');
}else{
document.write(a[i]);
}
if(i != a.length-1){
document.write(',');
}
}
document.write(']');
document.write('<br>');
a.pop();
document.write('[');
for(var i = 0; i < a.length; i++){
if(typeof a[i] === 'object'){
document.write('[' + a[i] + ']');
}else{
document.write(a[i]);
}
if(i != a.length-1){
document.write(',');
}
}
document.write(']');
document.write('<br>');
a.pop();
document.write('[');
for(var i = 0; i < a.length; i++){
if(typeof a[i] === 'object'){
document.write('[' + a[i] + ']');
}else{
document.write(a[i]);
}
if(i != a.length-1){
document.write(',');
}
}
document.write(']');

</script>
</head>

<body>
Registro Usuarios
<table border="2" width="5" cellspacing="5" cellpadding="1">
<tbody>
<tr>
<td>Nombre</td>
<td> <input type="text" name="txtnombre" value="" /> </td>
</tr>
<tr>

<td>Fecha</td>
<td><input type="text" name="txtfecha" value="" /></td>

</tr>
<tr>
<td>Cédula</td>
<td><input type="text" name="txtcedula" value="" /></td>
</tr>
<tr>
<th>
<input type="submit" value="Aceptar" name="btnaceptar" onclick="validar()" /></
th>

<th> <input type="submit" value="Fecha" name="btnfecha" onclick="actualizar()" /


></th>

<th></th>
</tr>
</tbody>
</table>
</body>
</html>

You might also like