Vida Una Homepage
Forum Home Forum Home > Programación > Códigos JavaScript
  New Posts New Posts RSS Feed - Mensaje al entrar en la web
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Mensaje al entrar en la web

 Post Reply Post Reply
Author
Message
Programador View Drop Down
Expert@
Expert@
Avatar

Joined: 09 Mayo 2009
Location: San Pedro Alc.
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote Programador Quote  Post ReplyReply Direct Link To This Post Topic: Mensaje al entrar en la web
    Posted: 25 Enero 2011 at 8:54am

Mensaje al entrar en la web

 
 
Copia y pega en <head>
 
<script language="JavaScript1.2">

//drag drop function for NS 4////
/////////////////////////////////

var dragswitch=0
var nsx
var nsy
var nstemp
function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}

//drag drop function for IE 4+////
/////////////////////////////////
var dragapproved=false
function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false
}
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}

if (document.all){
document.onmouseup=new Function("dragapproved=false")
}
////drag drop functions end here//////
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}

</script>
 
 
Copia y pega en tu pagina <body> si te da algun problema incluye esta parte dentro de una tabla . Puedes modificar los colores , el tipo de fuente , el tamaño...
Guardate esta imagen en el mismo directorio que el script y la pagina:
 
<div id="showimage" style="position:absolute;width:250px;left:10;top:70">
<table border="0" width="250" bgcolor="#FF0000" cellspacing="0" cellpadding="4">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0" height="36">
<tr>
<td onMousedown="initializedragie()" style="cursor:move" width="100%"><ilayer width="100%"><layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0">
<center>
<font face="Verdana" color="#FFFFFF"><strong>AQUÍ PUEDES PONER UN TITULO</strong></font>
</center></layer></ilayer></td>
<td style="cursor:hand"><a href="#" onClick="hidebox();return false">
<img src="close.gif" border=0 width="16" height="16"></a></td>
</tr>
<tr>
<td width="100%" bgcolor="#CCCC33" style="padding:2px" colspan="2">
<!--Begin html content here. --------->
<div align="center"><font size="2">Aquí puedes poner lo que quieras.<br>Imágenes, enlaces , , ,<img src="boy4.gif" border="0"></font><p><strong>
  <font size="2"><br>Cualquier código html sirve para configurar el mensaje que tu quieras.</font></strong></div>
<!--End of html content. --------->
</td>
</tr>
</table>
 
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.016 seconds.