fecha y hora
Alguien me puede decir como coger la hora de windows y insertarla en my pagina web
si me lo podeis escribir con el codigo html me hasreis un favor
:)
si me lo podeis escribir con el codigo html me hasreis un favor
:)
Hasta donde sé, HTML no recoge fecha y hora. Lo puedes hacer con JavaScript.
Pues, en HTML es dificil eso de la hora, pero, si se puede, solo que con la hora de cada persona de su makina, no de la tuya, me explico? o sea, si kieres tener, el reloj de tu pc para toda la red, en html no se puede, por que si se conectan de mexico, les dara la hora local, a si se conecten de usa, etc. si kieres una hora para todo el mundo en especial, puede ser de eventos etc, lo puedes hacer con java y hasta con el borland c++
ok, este es el codigo que debes ingresar en tu pagina en el lugar donde quieras que aparezca:
<CENTER>
</TABLE>
<BR>
<BR>
<BR>
<B><I><FONT SIZE="6" FACE="Comic Sans MS" COLOR="#000FFF"">
<SCRIPT languaje="JAVASCRIPT">
function dia_semana (d1,d2,d3,d4,d5,d6,d7) {
this[0]=d1;
this[1]=d2;
this[2]=d3;
this[3]=d4;
this[4]=d5;
this[5]=d6;
this[6]=d7;
}
function mes_ano (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12) {
this[0]=d1;
this[1]=d2;
this[2]=d3;
this[3]=d4;
this[4]=d5;
this[5]=d6;
this[6]=d7;
this[7]=d8;
this[8]=d9;
this[9]=d10;
this[10]=d11;
this[11]=d12;
}
semana= new dia_semana ("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado");
mes=new mes_ano ("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
var today = new Date;
diahoy = today.getDay();
fechahoy = today.getDate();
meshoy = today.getMonth();
horahoy = today.getHours();
minutohoy = today.getMinutes();
ano = today.getYear();
function dia () {
document.write (semana[diahoy]+' '+fechahoy);
document.write (' de '+mes[meshoy]+' de '+ano);
document.write ("<BR>");
if (minutohoy<10) {minutohoy="0"+minutohoy}
document.write (' Entraste a las '+horahoy+':'+minutohoy+' horas ');
}
</SCRIPT>
<SCRIPT>dia()</SCRIPT>
<SCRIPT languaje="JavaScript">
var hoy = new Date ();
var hora = hoy.getHours ();
</SCRIPT>
</FONT></I></B>
espero y sea lo que buscas.
<CENTER>
</TABLE>
<BR>
<BR>
<BR>
<B><I><FONT SIZE="6" FACE="Comic Sans MS" COLOR="#000FFF"">
<SCRIPT languaje="JAVASCRIPT">
function dia_semana (d1,d2,d3,d4,d5,d6,d7) {
this[0]=d1;
this[1]=d2;
this[2]=d3;
this[3]=d4;
this[4]=d5;
this[5]=d6;
this[6]=d7;
}
function mes_ano (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12) {
this[0]=d1;
this[1]=d2;
this[2]=d3;
this[3]=d4;
this[4]=d5;
this[5]=d6;
this[6]=d7;
this[7]=d8;
this[8]=d9;
this[9]=d10;
this[10]=d11;
this[11]=d12;
}
semana= new dia_semana ("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado");
mes=new mes_ano ("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
var today = new Date;
diahoy = today.getDay();
fechahoy = today.getDate();
meshoy = today.getMonth();
horahoy = today.getHours();
minutohoy = today.getMinutes();
ano = today.getYear();
function dia () {
document.write (semana[diahoy]+' '+fechahoy);
document.write (' de '+mes[meshoy]+' de '+ano);
document.write ("<BR>");
if (minutohoy<10) {minutohoy="0"+minutohoy}
document.write (' Entraste a las '+horahoy+':'+minutohoy+' horas ');
}
</SCRIPT>
<SCRIPT>dia()</SCRIPT>
<SCRIPT languaje="JavaScript">
var hoy = new Date ();
var hora = hoy.getHours ();
</SCRIPT>
</FONT></I></B>
espero y sea lo que buscas.
Bueno con el codigo HTML es muy dificil, una de las mejores formas que puedes insertar la fecha y hora es con JavaScrip. Es una de las maneras mas facil.
solo te puedo proporcionar este codigo (por el momento) espero y te sirva:
</STYLE>
<SCRIPT language=JavaScript>
<!-- Begin
if (document.all) {
yourLogo = " EXCELENTES VIDEOS DE LOLITAS -";
logoFont = "Arial";
logoColor = "RED";
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
// End -->
</SCRIPT>
hay que ponerlo en el lugar que quieras que aparezca, espero que te pueda dar el codigo que buscas realmente
</STYLE>
<SCRIPT language=JavaScript>
<!-- Begin
if (document.all) {
yourLogo = " EXCELENTES VIDEOS DE LOLITAS -";
logoFont = "Arial";
logoColor = "RED";
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
// End -->
</SCRIPT>
hay que ponerlo en el lugar que quieras que aparezca, espero que te pueda dar el codigo que buscas realmente