Pag 1 2 3 4 5
EMAIL ME
EMAIL GRATIS

 

Java Scripts

Bounce DHTML (Texto Bate e Volta) 



--------------------------------------------------------------------------------

Este script fará texto correr de um lado da tela para outro. Efeito muito bom.... Efeito idêntico ao da tag “Marquee" do Internet Explorer. 
Veja Código Fonte 
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000"> 
<body bgcolor='black' onload="ini()"> 
<Layer ID="stext" > 
<font color="ff00ff" fontsize="40"> 
</Layer> 

<Script Language="Javascript1.2"> 



<!-- Hiding 

// Made By The Javascript Libary (Copyright) 1999 - 2000 
// Do not remove this note. Removing it will be considered stealing. 
// Any case found without this code will be handed to the police. 
// The Javascript Libary - http://jslibrary.phiberoptix.com 
// More online examples can be found there 

var v=0; 

message="Maurijones Web Design" 

yes = 1 
function ini(){ 
document.stext.document.write("<font color='ff00ff' fontsize='40'>" + message); 
document.stext.document.close(); 
scrl(); 


num = window.innerWidth-(message.length *10) 

function scrl(){ 
if (v<num){ 
document.layers["stext"].left+=10 
v += 10 

else if(v<num*2){ 
document.layers["stext"].left-=10 
v += 10 

else{ 
v=0 

setTimeout('scrl()',1) 


//done Hiding--> 



</Script> 
ÍNDICE DOS SCRIPTS 




Texto Bate e Volta na Barra de Status 



--------------------------------------------------------------------------------

Outro adesivo legal. Olhe na barra de status.... Você notará que a palavra que corre vai e vem de fato, de um lado para o outro! Eu gosto desse script comparado com os outros 
Veja Código Fonte 
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000"> 
Dê Uma Olhada na Barra de Status<script LANGUAGE=JAVASCRIPT> 


// Declare all Local Variables Here 

// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 

Size2 = 125; 

Pos2 = Size2; 

Vel2 = 2; 

Dir2 = 2; 

Message2="Maurijones Web Design"; 

Size2-=Message2.length; 



function Bouncer(){ 

Dir2==2 ? Pos2-=Vel2 : Pos2+=Vel2; 

if (Pos2 < 1){ 

Dir2=1; 

Pos2=1; 



if (Pos2 > Size2){ 

Dir2=2; 

Pos2=Size2; 



Space2 = ""; 

for (count=1; count<Pos2; count++){ 

Space2 += " "; 



window.status = Space2 + Message2; 

setTimeout( "Bouncer();", 100); 



Bouncer() 

</script> 
ÍNDICE DOS SCRIPTS 



Texto Bate e Volta na Caixa de Texto 



--------------------------------------------------------------------------------

Isto fará seu texto "Correr indo e voltando" dentro de uma caixa de texto. É difícil explicar algo como um texto, que quando bate em um lado da caixa de texto irá mudar para outra direção. 
Veja Código Fonte 
<CENTER> 

<FORM NAME=PANEL2> 

<INPUT Size=70 Name=Bar2 Value=""> 

</FORM> 

</CENTER> 

<SCRIPT LANGUAGE=JAVASCRIPT> 



// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 


// Declare all Local Variables Here 

Size2 = 70; 

Pos2 = Size2; 

Vel2 = 2; 

Dir2 = 2; 

Message2="Maurijones Web Design"; 

Size2-=Message2.length; 



function Bouncer(){ 

Dir2==2 ? Pos2-=Vel2 : Pos2+=Vel2; 

if (Pos2 < 1){ 

Dir2=1; 

Pos2=1; 



if (Pos2 > Size2){ 

Dir2=2; 

Pos2=Size2; 



Space2 = ""; 

for (count=1; count<Pos2; count++){ 

Space2 += " "; 



document.PANEL2.Bar2.value= Space2 + Message2; 

setTimeout( "Bouncer();", 100); 



Bouncer() 


</SCRIPT> 
ÍNDICE DOS SCRIPTS 





Piscando na Barra de Status 



--------------------------------------------------------------------------------

A inacreditavelmente irritante tag de HTML “Blink = Piscar” (como em <blink>) está funcionando agora na barra de status. Isto é uma coisa muito exaustivo e difícil ler, eu usaria este script se eu realmente, 
de verdade gostasse dele. 
Veja Código Fonte 
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000"> 
Dê Uma Olhada na Barra de Status<script language="JavaScript"> 

<!-- 

// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 

var yourwords = "O Terrível Texto Piscante está de Volta"; 

var speed = 150; 

var control = 1; 

function flash() 



if (control == 1) 



window.status=yourwords; 

control=0; 



else 



window.status=""; 

control=1; 



setTimeout("flash();",speed); 



flash(); 

// --> 

</script> 
ÍNDICE DOS SCRIPTS 





Piscando na Caixa de Texto 



--------------------------------------------------------------------------------

Este script lhe permitirá ter o texto piscando em um elemento de caixa de texto. Ah! Eu nunca colocaria esse script na minha página. 
Veja Código Fonte 
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000"> 
<form name=blink> 
<input size= 40 name=it> 
</form> 


<script language="JavaScript"> 

<!-- 

// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 

var yourwords = "O Terrível Texto Piscante está de Volta "; 

var speed = 150; 

var control = 1; 

function flash() 



if (control == 1) 



document.blink.it.value=yourwords; 

control=0; 



else 



document.blink.it.value=""; 

control=1; 



setTimeout("flash();",speed); 



flash() 

// --> 


</script> 
ÍNDICE DOS SCRIPTS 





Cor de Texto Variável 



--------------------------------------------------------------------------------

Este simples script fará o texto da sua página mudar de Cor! Este é um script DHTML que muda a Cor do texto! Isto é realmente fantastico! Melhor ainda, foi programado por um cara louco que eu encontrei na web. 
Veja Código Fonte 
<script language="Javascript1.2"> 
<!-- 
// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 

function initArray() { 

this.length = initArray.arguments.length; 
for (var i = 0; i < this.length; i++) { 
this[i] = initArray.arguments[i]; 



var ctext = "Esta Mensagem Muda de Cor !!!" 
var speed = 1000 

var x = 0 

var color = new initArray("red", 
"blue", 
"black" 
); 

if(navigator.appName == "Netscape") { 
document.write('<layer id="c">'+ctext+'</layer><br>'); 


if (navigator.appVersion.indexOf("MSIE") != -1){ 
document.write('<div id="c">'+ctext+'</div>'); 


function chcolor(){ 

if(navigator.appName == "Netscape") { 
document.c.document.write('<font color="'+color[x]+'">' 
+ctext+'</font>'); 
document.c.document.close(); 


else if (navigator.appVersion.indexOf("MSIE") != -1){ 
document.all.c.style.color = color[x]; 


(x < color.length-1) ? x++ : x=0; 


setInterval("chcolor()",1000) 
//--> 
</script> 
ÍNDICE DOS SCRIPTS 






Javascript para Salvar Nome 



--------------------------------------------------------------------------------

Já viu antes? Algumas webpages sai para você e diz... " Diga-me seu nome " e em seguida, diz " Olá seu nome"? Agora nós vamos fazer isto mas com 1 opção extra - você nunca precisará digitar seu nome novamente ! Eu gosto deste script porque ele faz as pessoas se sentirem como se estivessem em casa. Dizendo Oi Suzana ou Oi Natália ou Olá WebSurfer é muito agradável (e cortês). Isto também pode ser incorporado em qualquer parte da webpage. 
Veja Código Fonte 
<SCRIPT language="JavaScript"> 


// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 


var username = GetCookie('username'); 

if (username == null) { 

username = prompt('Gentileza Digitar o seu Nome (Caso contrário, cancele)',""); 

if (username == null) { 

alert('Tudo bem se você não quiser dizer-me o seu nome'); 

username = 'Mr'; 

} else { 

pathname = location.pathname; 

myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/'; 

// set expiry date to 1 year from now. 

var largeExpDate = new Date (); 

largeExpDate.setTime(largeExpDate.getTime() + (365 * 24 * 3600 * 1000)); 

SetCookie('username',username,largeExpDate,myDomain); 





function getCookieVal (offset) { 

var endstr = document.cookie.indexOf (";", offset); 

if (endstr == -1) 

endstr = document.cookie.length; 

return unescape(document.cookie.substring(offset, endstr)); 



function GetCookie (name) { 

var arg = name + "="; 

var alen = arg.length; 

var clen = document.cookie.length; 

var i = 0; 

while (i < clen) { 

var j = i + alen; 

if (document.cookie.substring(i, j) == arg) 

return getCookieVal (j); 

i = document.cookie.indexOf(" ", i) + 1; 

if (i == 0) 

break; 



return null; 



function SetCookie (name, value) { 

var argv = SetCookie.arguments; 

var argc = SetCookie.arguments.length; 

var expires = (argc > 2) ? argv[2] : null; 

var path = (argc > 3) ? argv[3] : null; 

var domain = (argc > 4) ? argv[4] : null; 

var secure = (argc > 5) ? argv[5] : false; 

document.cookie = name + "=" + escape (value) + 

((expires == null) ? "" : ("; expires=" + 

expires.toGMTString())) + 

((path == null) ? "" : ("; path=" + path)) + 

((domain == null) ? "" : ("; domain=" + domain)) + 

((secure == true) ? "; secure" : ""); 




</SCRIPT> 
ÍNDICE DOS SCRIPTS 






Javascript para Salvar Nome2 



--------------------------------------------------------------------------------

Este aqui é mais longo, mas é diferente do Javascript para Salvar Nome1, pois permite você mudar o nome. A única diferença entre este e Javascript e o Javascript para Salvar Nome1 é que este último não pode mudar o nome. Se alguém cometer um erro de digitação, esse alguém terá que esperar alguns anos antes de ele possa redigitá-lo. Quanto a este script, a esse alguém será permitido mudar seu nome. Sim. É melhor. 

Veja Código Fonte 
<SCRIPT language="JavaScript"> 

<!-- 

// Keep the follwing line down when you use this script 
// Found at the Javascript Libary http://jslibrary.phiberoptix.com 
// More scripts are available there 


function getCookieVal (offset) { 
var endstr = document.cookie.indexOf (";", offset); 
if (endstr == -1) 
endstr = document.cookie.length; 
return unescape(document.cookie.substring(offset, endstr)); 


function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 

return null; 


function SetCookie (name, value) { 
var argv = SetCookie.arguments; 
var argc = SetCookie.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) + 
((secure == true) ? "; secure" : ""); 


function DeleteCookie(name) { 
var exp = new Date(); 
FixCookieDate (exp); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookie (name); 
if (cval != null) 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); 


var b = GetCookie("z") 
if (b == null) { 
storage() 


function storage() { 
var c = prompt("Gentileza inserir o seu nome para ser armazenado","") 
var thenewdate = new Date (); 
thenewdate.setTime(thenewdate.getTime() + (5*24*60*60*1000)); 
SetCookie('z',c,thenewdate); 


function change() { 
var c = prompt("Gentileza inserir o seu nome para ser gravado","") 
var thenewdate = new Date (); 
thenewdate.setTime(thenewdate.getTime() + (5*24*60*60*1000)); 
SetCookie('z',c,thenewdate); 


var z = GetCookie('z'); 
document.write("<center>Hi, "+z+".<br>" 
+"<a href='javascript:change()'>Você pode mudar este nome se você quiser.</a></center>") 
//--> 

</SCRIPT> 

Wherever you want the script, use the script below 

<SCRIPT> 
document.write(""+z+"") 
</SCRIPT>