FORO DE GUIAS DE MU
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.


FORO DE MU EN EL FORO ARAS TU PETICIONES DE LOGOS, TEMAS Q QUEIRAS SABER Y NU TENGAS Y PODRAS PROMOCIANAR TU SERVIDOR DE MU O EN EL Q JUEGAS.
 
ÍndiceBuscarÚltimas imágenesRegistrarseConectarse

 

 DIFERENTES CODIGOS JAVA

Ir abajo 
AutorMensaje
Admin
Admin
Admin


Cantidad de envíos : 27
Edad : 33
Localización : colombia
Fecha de inscripción : 29/01/2008

DIFERENTES CODIGOS JAVA Empty
MensajeTema: DIFERENTES CODIGOS JAVA   DIFERENTES CODIGOS JAVA Icon_minitimeVie Feb 01, 2008 3:45 am

No permite utilizar el botón derecho y no aparece nada (ni alert, etc)

Código:
<script language="Javascript">
<!-- Begin
document.oncontextmenu = function(){return false}
// End -->
</script>


______________________________________
NO PERMITE SELECCIONAR EL CONTENIDO DE UNA PAGINA

Código:
<script language="Javascript">
<!-- Begin
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
// End -->
</script>


_____________________________________________

POR SI HAY ALGUN ERROR EN LA PAGINA

Código:
<SCRIPT language=JavaScript>
function blockError(){return true;}
window.onerror = blockError;
</SCRIPT>


_____________________________________________

Código JavaScript para que aparezca un alert al utilizar el botón derecho

Código:
<script language="JavaScript">
<!-- Begin
function right(e) {
var msg = " [ www.thedaniex.com ] ";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg); // Delete this line to disable but not alert user
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg); // Delete this line to disable but not alert user
return false;
}
return true;
}
document.onmousedown = right;
// End -->
</script>



________________________________________________

No permite el botón derecho y además te penaliza con 10 clicks

Código:
<script language="Javascript">
zaehler=0;
function right(e) {
if (navigator.appName == 'Netscape'){
if (e.which == 3 || e.which == 2){
alert("Aqui no puedes utilizar el botón derecho del mouse");
for(i=0;i!=zaehler;i++)alert("Ya te avisé, te penalizaré con \n "+(zaehler-i)+"\n clicks.");
zaehler+=10;
alert("¡La proxima vez que lo hagas será peor! www.tuweb.algo");
return false;}}
if (navigator.appName == 'Microsoft Internet Explorer'){
if (event.button == 2 || event.button == 3){
alert("Aqui no puedes utilizar el botón derecho del mouse");
for(i=0;i!=zaehler;i++)alert("Ya te avisé, te penalizaré con \n "+(zaehler-i)+"\n clicks.");
zaehler+=10;
alert("¡La proxima vez que lo hagas será peor! www.tuweb.algo");
return false;}}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// --></script>


_______________________________________________

Se abre una ventana al utilizar el botón derecho

Código:
<SCRIPT language=JavaScript>
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) {
a=window.open("http://www.tuweb.algo/","WindowName","width=640,height=600,top=40,left=50,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
a=window.open("http://www.tuweb.algo/","WindowName","width=640,height=600,top=40,left=50,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
return false;
}
return true;
}
document.onmousedown=right;
window.onmousedown=right;
</SCRIPT>


_________________________________________________

CODIGO PARA QUE TU PAGINA SE AÑADA A FAVORITOS

Código:
<SCRIPT LANGUAGE="JavaScript">
<!--
function addBookmark()
{
if (window.external)
external.AddFavorite("http://www.tuweb.algo", "aqui adornalo como qeras")
else
alert("Tu navegador no soporta esta caracteristica");
}
// -->
</SCRIPT>



________________________________________________
TE ENSEÑA LA HORA Y FECHA EN EL ESTATUS

Código:
<script language="JavaScript">
<!--
mensaje=" |======| .: w W w . D a r k o L . e S . t L :. "
function hora() {
var h = new Date();
window.status="|======| "
+ h.getHours() +":"+ h.getMinutes() +"" +mensaje ;
window.setTimeout('hora()',100);
}
hora()
//-->
</script>


___________________________________________________

Escribir en "Title" y hacer que se maya moviendo cada X segundos.

Código:
<SCRIPT LANGUAGE="JavaScript">
var txt=" tu web . algo - wwww.tuweb.algo -";
var espera=200;
var refresco=null;
function rotulo_title() {
document.title=txt;
txt=txt.substring(1,txt.length)+txt.charAt(0);
refresco=setTimeout("rotulo_title()",espera);}
rotulo_title();
</SCRIPT>


__________________________________________________

TE DICE LA EL DIA, MES , AÑO DEL PC

Código:
<script language="JavaScript"><!--
var hoy = new Date();
dia = hoy.getDate();
mes = hoy.getMonth();
ano = hoy.getYear() + 0000;
if (mes == "0") nombremes = "<font color=#00FF00 size=2>Enero</font>";
else if (mes == "1") nombremes = "<font color=#00FF00 size=2>Febrero</font>";
else if (mes == "2") nombremes = "<font color=#00FF00 SIZE=2>Marzo</font>";
else if (mes == "3") nombremes = "<font color=#00FF00 SIZE=2>Abril</font>";
else if (mes == "4") nombremes = "<font color=#00FF00 SIZE=2>Mayo</font>";
else if (mes == "5") nombremes = "<font color=#00FF00 SIZE=2>Junio</font>";
else if (mes == "6") nombremes = "<font color=#00FF00 SIZE=2>Julio</font>";
else if (mes == "7") nombremes = "<font color=#00FF00 SIZE=2>Agosto</font>";
else if (mes == "8") nombremes = "<font color=#00FF00 SIZE=2>Septiembre</font>";
else if (mes == "9") nombremes = "<font color=#00FF00 SIZE=2>Octubre</font>";
else if (mes == "10") nombremes = "<font color=#00FF00 SIZE=2>Noviembre</font>";
else nombremes = "<font color=#00FF00 SIZE=2>Diciembre</font>";
document.write (dia);
document.write (" de ");
document.write (nombremes);
document.write (" del ");
document.write (ano);
// --></script>


____________________________________________

CERRAR LA VENTANA ACABO DE X RATOS

Código:
<script language="javascript">setTimeout("self.close();",7000)</script>


____________________________________________

DESABILITAR BOTON DERECHO DEL MOUSE Y EL TECLADO

Código:
<SCRIPT language=JavaScript>
<!--
var message="La copia está prohibida"; //Boton derecho
function click(mouse) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (mouse.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MouseDown); //Teclado
function keypressed() {
alert("Tecla no permitida");
}
}
document.onmousedown=click;
document.onkeydown=keypressed;
// -->
</SCRIPT>
</P></BODY></HTML>



____________________________________________

TERREMOTO (QE LA PANTALLA SE MUEVA Y TIEMBLE)

Código:
<!-- para llamarlo con un botón-->
<INPUT onclick=shake(40) type=button value=""Terremoto"">
<SCRIPT language=JavaScript1.2>
<!-- Begin
function shake(n) {
if (n==1)
{document.body.bgColor = "#0000DA";
}
else
{document.body.bgColor = "#FF8C00"
}

if (self.moveBy) {
for (i = 15; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->
</SCRIPT>



________________________________________
Volver arriba Ir abajo
https://gui-mu.activoforo.com
 
DIFERENTES CODIGOS JAVA
Volver arriba 
Página 1 de 1.
 Temas similares
-
» VARIOS CODIGOS.
» VARIOS CODIGOS HTML
» JAVA Y JAVASCRIPT

Permisos de este foro:No puedes responder a temas en este foro.
FORO DE GUIAS DE MU :: TRUCOS HTML Y JAVASCRIPT. :: CODIGOS JAVASCRIPT-
Cambiar a: