Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| playground:rtdp [31/01/2012 00:52] – r-ml | playground:rtdp [31/01/2012 01:56] (Version actuelle) – r-ml | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| < | < | ||
| - | <SCRIPT LANGUAGE=" | ||
| - | <!--- Begin | ||
| - | var CurrentMsg = 'hello '; | ||
| - | function update(msg) { | ||
| - | var pad_str=""; | ||
| - | n = msg.length; | ||
| - | | ||
| - | pad = (73-n)/ | ||
| - | for(var i=0; i<pad; i++) { | ||
| - | | ||
| - | } | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | timer = setTimeout(" | ||
| - | } | ||
| - | |||
| - | function MakeArray(n) { | ||
| - | | ||
| - | | ||
| - | this[i] = ""; | ||
| - | | ||
| - | | ||
| - | } | ||
| - | var index = 1; | ||
| - | var notice_num = 10; | ||
| - | var notices = new MakeArray(notice_num); | ||
| - | notices[1] = " | ||
| - | notices[2] = "You can fill this box with any message you like"; | ||
| - | notices[3] = "As you can see, it is quite easy"; | ||
| - | notices[4] = "to provide messages to the users of your site."; | ||
| - | notices[5] = "using this JavaScript"; | ||
| - | var timer = 0; | ||
| - | function nochange() { | ||
| - | | ||
| - | } | ||
| - | function idleMsg() { | ||
| - | | ||
| - | | ||
| - | index=1; | ||
| - | | ||
| - | } | ||
| - | // End --> | ||
| - | </ | ||
| - | <SCRIPT LANGUAGE="JavaScript"> | + | <style type="text/css"> |
| - | <!--- Begin | + | .infobulle{ |
| - | var CurrentMsg | + | position: |
| - | function | + | visibility : hidden; |
| - | var pad_str="" | + | border: |
| - | n = msg.length; | + | padding: |
| - | if(n<72) { | + | font-family: Verdana, Arial; |
| - | pad = (73-n)/2; | + | font-size: 10px; |
| - | for(var i=0; i<pad; i++) { | + | background-color: #FFFFCC; |
| - | pad_str+=" "; | + | } |
| - | | + | </ |
| - | | + | |
| - | | + | < |
| - | | + | function |
| - | clearTimeout(timer); | + | { |
| - | timer = setTimeout("idleMsg()",4000); | + | return document.getElementById(id); |
| - | } | + | } |
| - | | + | var i=false; |
| - | function MakeArray(n) { | + | function move(e) { |
| - | this.length=n; | + | if(i) { |
| - | for(var i = 1; i<= n; i++) { | + | if (navigator.appName!=" |
| - | this[i] = ""; | + | GetId(" |
| - | | + | GetId(" |
| - | return(this); | + | } |
| - | } | + | else { |
| - | var index = 1; | + | if(document.documentElement.clientWidth> |
| - | var notice_num = 10; | + | GetId(" |
| - | var notices = new MakeArray(notice_num); | + | GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+" |
| - | notices[1] | + | |
| - | notices[2] | + | else { |
| - | notices[3] = "As you can see, it is quite easy"; | + | GetId(" |
| - | notices[4] | + | GetId(" |
| - | notices[5] = "using this JavaScript"; | + | |
| - | var timer = 0; | + | } |
| - | function nochange() { | + | |
| - | | + | } |
| - | } | + | |
| - | function | + | function montre(text) { |
| - | update(notices[index++]); | + | if(i==false) { |
| - | if(index> | + | GetId("curseur").style.visibility="visible"; |
| - | index=1; | + | GetId("curseur").innerHTML = text; |
| - | | + | i=true; |
| - | } | + | } |
| - | // End --> | + | } |
| - | </SCRIPT> | + | function |
| + | if(i==true) { | ||
| + | GetId(" | ||
| + | i=false; | ||
| + | } | ||
| + | } | ||
| + | document.onmousemove=move; | ||
| + | </script> | ||
| + | <div id=" | ||
| + | |||
| + | <p onmouseover=" | ||
| </ | </ | ||