Alerta em Javascript
---------------------------------------------------------------------------------
Um javascript simples, básico que mostra uma caixa "pop-up " para lhe notificar sobre quaisquer informações. Você tem que clicar O.K para proceder. Este Javascript é o mais simples de todos os JavaScript. É normalmentesado para exibir informações importantes para o espectador.
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
alert( 'É Aqui Onde Você Quer Digitar a Sua Mensagem')
</script>
ÍNDICE DOS SCRIPTS
Confirmação em Javascript
---------------------------------------------------------------------------------
Quase semelhante ao alerta de Javascript só que tem um botão "O.K" e um de "cancelamento". Este javascript é quase o mesmo Javascript confirme, só que tem um O.K " e " cancelamento ". Mas, não tem nenhum uso específico até que você veja o Javascript Confirmação2 ou Javascript Confirmação3.
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
confirm ('Este é um javascript de Confirmação Sem Uso Específico')
// JavaScript ends ---------->
</SCRIPT>
ÍNDICE DOS SCRIPTS
Confirmação 2 em Javascript
---------------------------------------------------------------------------------
Este aqui é mais útil. Manda você de volta para o último site de onde você veio se você pressionar o “cancelamento" . Isto é uma confirmação em javascript que... pelo menos tem algum uso. Este javascript manda você de volta à página de onde você veio se você pressionar o botão “Cancel”.
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 Message = "Tem certeza de que quer voltar para a minha homepage ?";
var URL = "http://members.8op.com/AutoCAD";
if (! confirm (Message)) {
window.history.back();
}
</SCRIPT>
ÍNDICE DOS SCRIPTS
Confirmação 3 em Javascript
---------------------------------------------------------------------------------
Este aqui manda você para uma página específica quando você pressiona o botão “Cancelamento”. Este javascript é útil... ele conduz você para outro URL. Eu não consigo pensar em nada útil para ele, mas eu garanto que você com certeza vai saber uma maneira de usá-lo .
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 Message = "Tem Certeza de que Quer Voltar para a Minha Homepage ?";
var URL = "http://.member.8op.com/AutoCAD/";
if (! confirm (Message)) {
window.location= URL;
}
</SCRIPT>
ÍNDICE DOS SCRIPTS
Banner com Javascript
---------------------------------------------------------------------------------
A versão antiga, clássica... Rola uma mensagem ao longo da Barra de Status. Percebe algo engraçado sobre esta página? Sim... as palavras da barra de status estão rolando! Esta script é muito comumente usado em home pages, páginas Comerciais etc.
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 scrollCounter = 0;
var scrollText = " Você gosta deste banner ? Legal huh ? Esta é a sua chance de usar este script ... então pegue-o it !";
var scrollDelay = 70;
var i = 0;
while (i ++ < 140)
scrollText = " " + scrollText;
function Scroller()
{
window.status = scrollText.substring(scrollCounter++,
scrollText.length);
if (scrollCounter == scrollText.length)
scrollCounter = 0;
setTimeout("Scroller()", scrollDelay);
}
Scroller();
//-->
</script>
ÍNDICE DOS SCRIPTS
Javascript para Banner em Caixa de Texto
---------------------------------------------------------------------------------
Muito mais dinâmico, muito mais interessante que o Javascript para o Banner comum. Ele exibe as palavras em uma caixa de texto. Ou um (documento escrito). Esta banner é muito interessante. As letras rolam em uma caixa. Muito, muito, muito excelente.
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 msg=" Este é Um Banner de Caixa de Texto."
+"Espantoso, Né ? Realmente legal ... "
+"Este Banner é Único ... e tem sua própria especialidade ... Está em uma caixa de texto "
+"Eu não acho que você tenha visto este banner antes por isso ... PEGUE O SCRIPT agora !"
var banTime1;
function banner(){
msg=msg.substring(1,msg.length)+msg.substring(0,1);
document.banner.text.value=msg;
banTime1=setTimeout("banner()",100);
}
//-->
</script>
</head>
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000" onload="banner()">
<center>
<form NAME="banner"><input TYPE="text" NAME="text" SIZE=50></form></center>
ÍNDICE DOS SCRIPTS
Javascript para Banner Máquina de Escrever
---------------------------------------------------------------------------------
Revela a palavra letra por letra ao longo da barra de status. (como uma máquina de escrever) Totalmente interessante. Esta é o grande script para sua página se você estiver enjoado de todos esses banners rolantes. Você vai gostar deste com certeza... E, esse pequeno " _ " aumenta o drama e faz isso parecer como se você realmente estivesse digitando uma mensagem para o espectador.
(embora, você possa tirá-lo se você quiser).
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 current = 0
var x = 0
var speed = 100
var speed2 = 2000
function initArray(n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
typ = new initArray(4)
typ[0]="Esta é mensagem 1"
typ[1]="Agora esta é a mensagem 2"
typ[2]="Não, não diga que tem 3 mensagens para fazer"
typ[3]="Sim, esta é a mensagem 4, é a última mensagem (e é comprida)"
function typewrite() {
var m = typ[current]
window.status = m.substring(0, x++) + "_"
if (x == m.length + 1) {
x = 0
current++
if (current > typ.length - 1) {
current = 0
}
setTimeout("typewrite()", speed2)
}
else {
setTimeout("typewrite()", speed)
}
}
typewrite()
//-->
</script>
ÍNDICE DOS SCRIPTS
Javascript para Banner Máquina de Escrever 2
---------------------------------------------------------------------------------
Eu não sei como chamar isto... mas é exatamente igual ao Javascript para Banner tipo Máquina de Escrever, so que tem um retrocesso. Esta é basicamente a mesma coisa que a Máquina de escrever, exceto que ele se apaga após a exibição de toda mensagem. Mas... é bastante não profissional...
Se você quiser um script divertido você deve escolher este...
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 current = 0
var x = 0
var speed = 100
var back = 20
var speed2 = 2000
var back2 = 1500
function initArray(n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
typ = new initArray(4)
typ[0]="This is Message 1"
typ[1]="Now it is Message 2"
typ[2]="No, do not say I have to do 3 messages"
typ[3]="Yea, this message, 4, is the last message (and it's long)"
function typewrite() {
var m = typ[current]
window.status = m.substring(0, x++)
if (x == m.length + 1) {
setTimeout("erase()", back2)
}
else {
setTimeout("typewrite()", speed)
}
}
function erase() {
var m = typ[current]
window.status = m.substring(0, x--)
if (x < 0) {
current++
setTimeout("typewrite()", speed2)
if (current > typ.length - 1) {
current = 0
}
}
else {
setTimeout("erase()", back)
}
}
typewrite()
//-->
</script>
ÍNDICE DOS SCRIPTS
Javascript tipo Exibição de Slide
---------------------------------------------------------------------------------
Você vai gostar deste aqui... é uma exibição de slide que mostra as palavras. Eu garanto - você vai adorá-lo!!!! Você nunca viu este antes, certo? Eu gostei muito dele. Melhor ainda é que ele pode ser completamente personalizado. E funciona em todos os browsers que suporta frames e Javascript.
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
i=0; a="";
sText=new Array(
"Tenho certeza que você vai gostar deste",
" Tenho certeza que você vai gostar deste!!!!",
"Eis aqui o script ",
"Não creio em guardar segredo ... compreende?");
j=sText.length;
function StartShow() {
nText=sText[i];
sTags='<body bgcolor="black"><center><table border=0 height=100%><tr><td align="center"><strong><font face="Arial" color="Bule" size=6>'
+ nText+ '</font></strong></td></tr></table></center></body>';
if (i == j) { parent.location="a.html" };
if (i < j) { parent.f1.location="JavaScript: parent.sTags" };
i++;
setTimeout("StartShow()",1000);
}
document.write("<frameset rows='100%,*' onLoad='StartShow()' border=0><frame src='JavaScript:parent.a' name='f1'></frameset>");
// end hiding -->
</SCRIPT>
</HEAD>
<BODY TEXT="#FFCC00" BGCOLOR="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<BR> <FONT SIZE=+4></FONT>
<CENTER><FONT SIZE=+4>:-(Pare que você um browser que não suporta
JavaScript.:-(</FONT></CENTER>
<CENTER> </CENTER>
<CENTER></CENTER>
<CENTER><FONT SIZE=+4><A
HREF="a.html">Clique Aqui para
continuar.</A></FONT></CENTER>
</BODY>
</HTML>
ÍNDICE DOS SCRIPTS
Texto em Forma de Disparo
---------------------------------------------------------------------------------
Você pode fazer o texto parecer como se eles estivessem sendo “Disparados” da esquerda, letra por letra, exatamente outro lindo adesivo. Mas, isto e´, Este é outro extravagante disparador de texto.
Eu gosto deste de qualquer forma.. é realmente legal
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 text = "Este é um teste.";
var total_length = 120; // length of string+spaces
function doShoot(msg) {
var status_message = "";
var assembling = "";
window.status = status_message
var index = 0;
var location = 0, i;
// now shoot one letter at a time
for(i=0; i < msg.length; i++) { // moves through the message
for(j=total_length-status_message.length; j > -1;j--) {
// see how many spaces have to be added
assembling = " ";
for(var k=0; k < j; k++) {
assembling += " ";
}
assembling += msg.charAt(i);
window.status = status_message +assembling
}
status_message += assembling;
}
}
doShoot(text);
</SCRIPT>
ÍNDICE DOS SCRIPTS
Hover - Pairar o Mouse sobre o Texto
---------------------------------------------------------------------------------
Permite a você apenas sublinhar todos os links em sua webpage quando seu mouse passa sobre ele. Só funciona com o IE 4.0. Quando você não tem, existe um problema. Apenas uma observação - Isto não é Javascript é CSS
Veja Código Fonte
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Maurijones Albuquerque">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
<title>CSS hover</title>
<STYLE TYPE="text/css">
<!--
A:link, A:visited { text-decoration: none }
A:hover { text-decoration: underline; color: none }
-->
</STYLE>
</head>
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000">
<a href="../index.html">Passe o mouse sobre este texto</a>
</body>
</html>
ÍNDICE DOS SCRIPTS
Hover que Funciona com o Netscape
---------------------------------------------------------------------------------
Permite a você apenas sublinhar um link em sua webpage quando seu mouse passa sobre ele - Mas funciona com o Netscape!
Veja Código Fonte
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Gabriel">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]">
<title>Hover Netscape</title>
</head>
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000">
<LAYER name="text"
onmouseover="changeto1('http://jslibrary.phiberoptix.com','The Main Page','text')"
onmouseout ="changefrom1('The Main Page','text')" >
<FONT COLOR="#FF0000">The Main Page</FONT>
</LAYER>
<SCRIPT language="JavaScript1.2">
// Made By The Javascript Libary (Copyright) 1999 - 2000
// Do not remove this note. Removing it will be considered stealing.
// The Javascript Libary - http://jslibrary.phiberoptix.com
// More online examples can be found there
var color="red"
function changeto(){
setTimeout(changeto1, "1");
}
function changeto1(link,text,name) {
document.layers[name].document.write("<a href='"+link+"'>"
+"<font color='"+color+"'>"+text+"</font></a> ");
document.layers[name].document.close();
}
function changefrom(){
setTimeout(changefrom1, "1");
}
function changefrom1(text,name) {
document.layers[name].document.write("<font color="+color+">"+text+"</font>");
document.layers[name].document.close();
}
function link(){
}
</SCRIPT>
</body>
</html>
ÍNDICE DOS SCRIPTS
Citação Randômica
---------------------------------------------------------------------------------
Este script pode imprimir uma citação randômica. Um grande rodapé, visto que você pode terminar bem com alguns comentários engenhosos.
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 makeArray(len) {
for (var i = 0; i<len; i++) this[i] = null;
this.length = len;
}
//Array of quotes
var quote = new makeArray(5);
quote[0] = '\"Educação é ir para a universidade para aprender a expressar sua ignorância em termos científicos\"';
quote[1] = '\"Chance favors the prepared mind\"';
quote[2] = '\"I hate the idea of causes, and if I had to choose between betraying my country and betraying my friend, I hope I should have the guts to betray my country.\" -E.M. Forester';
quote[3] = '\"The only difference between bravery and stupidity is the outcome\"';
quote[4] = '\"One should never let a formal education get in the way of learning\" -Mark Twain';
//random number generator
function rand(n) {
seed = (0x015a4e35 * seed) % 0x7fffffff;
return (seed >> 16) % n;
}
var now = new Date()
var seed = now.getTime() % 0xfffffff
document.write(quote[rand(quote.length)])
</SCRIPT>
ÍNDICE DOS SCRIPTS
Caixa de Informação
---------------------------------------------------------------------------------
Este script pode lhe permitir ter uma caixa de texto, com o texto variando.
Veja Código Fonte
<CENTER>
<FORM name="messages" onSubmit="return false">
<input type="text" name="field" size=73 value="" onFocus="self.status='This is a JavaScript info. field'; return true"
onChange="nochange()">
</FORM>
</CENTER>
<SCRIPT LANGUAGE="JavaScript">
// Do not remove these comments when using the script
// Made By The Javascript Libary
// The Javascript Libary - http://jslibrary.phiberoptix.com
// More online examples can be found there
<!--- Begin
var CurrentMsg = 'hello ';
function update(msg) {
var pad_str="";
n = msg.length;
if(n<72) {
pad = (73-n)/2;
for(var i=0; i<pad; i++) {
pad_str+=" ";
}
}
CurrentMsg = pad_str + msg;
document.messages.field.value = CurrentMsg;
clearTimeout(timer);
timer = setTimeout("idleMsg()",4000);
}
function MakeArray(n) {
this.length=n;
for(var i = 1; i<= n; i++) {
this[i] = "";
}
return(this);
}
var index = 1;
var notice_num = 6;
var notices = new MakeArray(notice_num);
notices[1] = "Barra de Informações";
notices[2] = "Este é um script realmente legal que pode exibir muitas informações";
notices[3] = "Numa homepage de maneira atraente !";
notices[4] = "Este script é ralmente legal";
notices[5] = "Então o que está esperando ?";
notices[6] = "Pegue o script !!";
var timer = setTimeout('idleMsg()',4000);
function nochange() {
document.messages.field.value = CurrentMsg;
}
function idleMsg() {
update(notices[index++]);
if(index>notice_num) {
index=1;
}
}
// End -->
</SCRIPT>
ÍNDICE DOS SCRIPTS
Caixa de Informação 2
---------------------------------------------------------------------------------
Este script pode lhe permitir ter uma caixa de texto, com o texto variando, só que isto é na barra de status
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
<!--- Begin
var CurrentMsg = 'hello ';
function update(msg) {
var pad_str="";
n = msg.length;
if(n<72) {
pad = (73-n)/2;
for(var i=0; i<pad; i++) {
pad_str+=" ";
}
}
CurrentMsg = pad_str + msg;
window.status = CurrentMsg;
clearTimeout(timer);
timer = setTimeout("idleMsg()",4000);
}
function MakeArray(n) {
this.length=n;
for(var i = 1; i<= n; i++) {
this[i] = "";
}
return(this);
}
var index = 1;
var notice_num = 6;
var notices = new MakeArray(notice_num);
notices[1] = "Barra de Informações";
notices[2] = "Este é um script realmente legal que pode exibir muitas informações";
notices[3] = "Numa homepage de maneira atraente !";
notices[4] = "Este script é ralmente legal";
notices[5] = "Então o que está esperando ?";
notices[6] = "Pegue o script !!";
var timer = setTimeout('idleMsg()',4000);
function nochange() {
window.status = CurrentMsg;
return true;
}
function idleMsg() {
update(notices[index++]);
if(index>notice_num) {
index=1;
}
}
// End -->
</script>
Dê Uma Olhada na Barra de Status
ÍNDICE DOS SCRIPTS
Caixa de Informação 3
---------------------------------------------------------------------------------
Este script pode lhe permitir ter uma caixa de texto, com o texto variando, só que isto é feito com HTML Dinâmico. Fora os três scripts de "caixa de Informação ", você não concorda que este é o melhor? Esta script é destinado a deslumbrar e entreter suas visitantes, então por que não adiciona este no script?
Veja Código Fonte
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000">
<br>
<LAYER ID="messages" >
<CENTER><font color="blue">Espere por favor ....</font></center>
</layer>
<br>
<SCRIPT LANGUAGE="JavaScript">
<!--- Begin
// Do not remove these comments when using the script
// Made By The Javascript Libary
// The Javascript Libary - http://jslibrary.phiberoptix.com
// More online examples can be found there
var CurrentMsg = 'hello ';
function update(msg) {
var pad_str="";
n = msg.length;
if(n<72) {
pad = (73-n)/2;
for(var i=0; i<pad; i++) {
pad_str+=" ";
}
}
CurrentMsg = pad_str + msg;
document.messages.document.write("<CENTER><font color='blue'>"+CurrentMsg+" </font> " + "</center> ");
document.messages.document.close();
clearTimeout(timer);
timer = setTimeout("idleMsg()",4000);
}
function MakeArray(n) {
this.length=n;
for(var i = 1; i<= n; i++) {
this[i] = "";
}
return(this);
}
var index = 1;
var notice_num = 6;
var notices = new MakeArray(notice_num);
notices[1] = "Barra de Informações";
notices[2] = "Este é um script realmente legal que pode exibir muitas informações";
notices[3] = "Numa homepage de maneira atraente !";
notices[4] = "Este script é ralmente legal";
notices[5] = "Então o que está esperando ?";
notices[6] = "Pegue o script !!";
var timer = setTimeout('idleMsg()',4000);
function nochange() {
document.messages.document.write("<CENTER><font color='blue'>"+CurrentMsg+" </font> " + "</center> ");
document.messages.document.close();
return true;
}
function idleMsg() {
update(notices[index++]);
if(index>notice_num) {
index=1;
}
}
// End -->
</SCRIPT>
ÍNDICE DOS SCRIPTS
Ticker Randômico
---------------------------------------------------------------------------------
Este é exatamente outro adesivo interessante, mas este aqui tem um enlaçamento - ele dá mensagens randômicas - Isso é tudo. Ele dá uma mensagem uma randômica de uma maneira bastante interessante
Veja Código Fonte
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000">
Look in the status Bar<script LANGUAGE="JavaScript">
<!-- hide from old browsers
// 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 str=""
var direction="left"
function createArray(n)
{
for (var i = 0; i < n; i++) {this[i] = 0}
return this
}
var js_mult1=3141
var js_mult2=5821
var js_m1=100000000
var js_m2=10000
var js_iseed=0
var js_iseed1=0
var js_iseed2=0
function random(n)
{
if (js_iseed == 0)
{
now = new Date()
js_iseed = now.getHours() + now.getMinutes() * 60
+ now.getSeconds() * 3600
}
js_iseed1 = js_iseed / js_m2
js_iseed2 = js_iseed % js_m2
var tmp = (((js_iseed2 * js_mult1 + js_iseed1 * js_mult2) % js_m2) *
js_m2 + (js_iseed2 * js_mult2)) % js_m1
js_iseed = (tmp + 1) % js_m1
return (Math.floor((js_iseed/js_m1) * n))
}
msgArray = createArray(5)
msgArray[0] = "Você tem a Mensagem Randômica Um"
msgArray[1] = "Você tem a Mensagem Randômica Dois"
msgArray[2] = "Você tem a Mensagem Randômica Três"
msgArray[3] = "Você tem a Mensagem Randômica Quatro"
msgArray[4] = "Você tem a Mensagem Randômica Cinco"
msg = ""
dmsg = ""
function doMessage()
{
if (msg == dmsg) // reset and delay
{
msg = msgArray[random(5)]
dmsg = ""
for (var ii = 0; ii < msg.length; ii++) dmsg += " "
JSCTimeOutID = window.setTimeout('doMessage()',100)
return true
}
// pick a character
var ii = random(msg.length)
var astr = dmsg.substring(0, ii)
var bstr = msg.substring(ii, ii+1)
var cstr = dmsg.substring(ii+1, dmsg.length)
dmsg = astr+bstr+cstr
window.status = dmsg
JSCTimeOutID = window.setTimeout('doMessage()',50)
return true
}
JSCTimeOutID = window.setTimeout('doMessage()',500);
<!-- done hiding -->
</script>
ÍNDICE DOS SCRIPTS
Mensagem de Menu
---------------------------------------------------------------------------------
Este script pode lhe permitir ter uma caixa de texto e uma caixa de seleção. Então, de acordo com a opção que você escolher, ele dará um mensagem diferente. Útil para fornecer dados. Muito útil. Este script é simplesmente um daqueles que apresenta a definição da mensagem em uma caixa de texto (Depois de você haver escolhido uma na lista) E então simplesmente clique um Botão "Vai!" e você está lá! Uau, isso é legal. Eu levei alguns tempo para terminar este script, então por que você não usa ele na sua webpage?
Veja Código Fonte
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000">
<CENTER>
<form name="messageForm">
<select name="messagePick" OnChange="messageReveal()">
<option value="0">Message 1
<option>Message 2
<option>Message 3
<option>Mwssage 4
</select>
<br><p>
<textarea name="messageField" rows=6 cols=50 wrap=virtual></textarea>
</form>
</CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// 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 num_messages=4
var messages = new Array(num_messages);
messages[0] = "Você pode digitar qualquer coisa aqui ";
messages[1] = "Digite qualquer coisa, mas esta é a segunda mensagem ";
messages[2] = "Digite qualquer coisa, mas esta é a terceira mensagem ";
messages[3] = "Digite qualquer coisa, mas esta é a quarta mensagem";
function messageReveal() {
var messageindex = document.messageForm.messagePick.selectedIndex
document.messageForm.messageField.value = messages[messageindex];
}
// End -->
</SCRIPT>
ÍNDICE DOS SCRIPTS
Texto em Zoom
---------------------------------------------------------------------------------
Este script pode lhe permitir ter texto com um efeito de zoom, letra por letra. (Do Grande ao tamanho exato). Também muda a Cor das tags a medida que se torna similar. Efeito muito legal. Pode botar fé.
Veja Código Fonte
<body text="#C0C0C0" bgcolor="#000000" link="#FFFF00" vlink="#FFCC00" alink="#FF0000" onload="start()">
<LAYER name="canvas0" top=90 left=4 width="100%" height="300"></LAYER><LAYER name="canvas1" top=90 left=4 width="100%" height="300"></LAYER><LAYER name="canvas2" top=90 left=4 width="100%" height="300"></LAYER><LAYER name="canvas3" top=90 left=4 width="100%" height="300"></LAYER><LAYER name="canvas4" top=90 left=4 width="100%" height="300"></LAYER><LAYER name="canvas5" top=90 left=4 width="100%" height="300"></LAYER><LAYER name="canvas6" top=90 left=4 width="100%" height="300"></LAYER><SCRIPT>
// 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 strsize; // q string size, customize it.
function start() {
q="The Javascript Libary"; // q string, customize it.
strsize=28;
generate_char(q);
}
function generate_char(cc) {
document.layers['canvas0'].document.open('text/html');
j=0; eend=strsize;
for(i=0;i<eend;i++) {
dd=cc.charAt(i);
document.layers['canvas0'].document.write('<ilayer visibility="hide" name="c'+j+'b'+i+'"><font color="#ffffff" point-size="'+(j+2)+'0pt">'+dd+'</font></ilayer>');
}
document.layers['canvas0'].document.close();
create_the_rest(cc);
}
function create_the_rest(cc) {
eend=strsize;
for(j=1;j<6;j++) {
document.layers["canvas"+j].document.open('text/html');
for(i=0;i<eend;i++) {
dd=cc.charAt(i);
tt=document.layers['canvas0'].document.layers['c'+0+'b'+i].top;
ll=document.layers['canvas0'].document.layers['c'+0+'b'+i].pageX;
if(j==5) colortext="#151515";
if(j==4) colortext="#555555";
if(j==3) colortext="#888888";
if(j==2) colortext="#bbbbbb";
if(j==1) colortext="#ffffff";
document.layers['canvas'+j].document.write('<layer visibility="hide" name="c0b'+i+'" top="'+tt+'" left="'+ll+'"><font color="'+colortext+'" point-size="'+(j*2)+'0pt">'+dd+'</font></layer>');
}
document.layers["canvas"+j].document.close();
}
shotthem();
}
jcounter=5;
icounter=0;
var lastlayer;
function shotthem() {
document.layers["canvas"+jcounter].document.layers["c0b"+icounter].visibility="show";
if(jcounter==5&&icounter==0) {
} else {
if(jcounter!=5) lastlayer.visibility="hide";
}
lastlayer=document.layers["canvas"+jcounter].document.layers["c0b"+icounter];
jcounter--;
if(jcounter==0) {
jcounter=5;
icounter++;
}
if(icounter<strsize) {
setTimeout("shotthem()",20);
}
}
</SCRIPT>
ÍNDICE DOS 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>
ÍNDICE DOS SCRIPTS