Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
playground:rtdp [31/01/2012 00:52] – r-mlplayground:rtdp [31/01/2012 01:56] (Version actuelle) – r-ml
Ligne 1: Ligne 1:
 <html> <html>
-<SCRIPT LANGUAGE="JavaScript"> 
-<!--- 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 = 10;                    
-var notices = new MakeArray(notice_num);         
-notices[1] = "Welcome to JavaScript Search!";         
-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() {                            
- document.messages.field.value = CurrentMsg;         
-}                    
-function idleMsg() {                            
- update(notices[index++]);                            
- if(index>notice_num) {  
-  index=1;  
- }   
-} 
-// End -->                   
-</SCRIPT> 
  
  
-<SCRIPT LANGUAGE="JavaScript"> + <style type="text/css"> 
-<!--- Begin + .infobulle{ 
-var CurrentMsg = 'hello ';                     + position: absolute;  
-function update(msg) {                            + visibility : hidden; 
- var pad_str="";                            + border: 1px solid Black; 
- n = msg.length;                            + padding: 10px; 
- 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+=" ";                         + } 
-  }                         + </style> 
- }                           +  
- CurrentMsg = pad_str + msg;                            + <script language="javascript" type="text/javascript"> 
- document.messages.field.value = CurrentMsg; + function GetId(id) 
- 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!="Microsoft Internet Explorer") { 
-  this[i] = "";                 +     GetId("curseur").style.left=e.pageX + 5+"px"; 
- }                            +     GetId("curseur").style.top=e.pageY + 10+"px"; 
- return(this);         +     } 
-}                +     else { 
-var index = 1;            +     if(document.documentElement.clientWidth>0) { 
-var notice_num = 10;                    +         GetId("curseur").style.left=20+event.x+document.documentElement.scrollLeft+"px"; 
-var notices = new MakeArray(notice_num);         +         GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+"px"; 
-notices[1] = "Welcome to JavaScript Search!";         +     } 
-notices[2] = "You can fill this box with any message you like"; +     else { 
-notices[3] = "As you can see, it is quite easy";         +         GetId("curseur").style.left=20+event.x+document.body.scrollLeft+"px"; 
-notices[4] = "to provide messages to the users of your site."; +         GetId("curseur").style.top=10+event.y+document.body.scrollTop+"px"; 
-notices[5] = "using this JavaScript";  +     } 
-var timer = 0;                    +     } 
-function nochange() {                            +   } 
- document.messages.field.value = CurrentMsg;         + } 
-}                    +  
-function idleMsg() {                            + function montre(text) { 
- update(notices[index++]);                            +   if(i==false) { 
- if(index>notice_num) {  +   GetId("curseur").style.visibility="visible"; 
-  index=1;  +   GetId("curseur").innerHTML = text; 
- }   +   i=true; 
-} +   } 
-// End -->                   + } 
-</SCRIPT>+ function cache() { 
 + if(i==true) { 
 + GetId("curseur").style.visibility="hidden"; 
 + i=false; 
 + } 
 + } 
 + document.onmousemove=move; 
 + </script>
  
 +<div id="curseur" class="infobulle"></div>
 +
 +<p onmouseover="montre('Le HTML est accepté ici.<br />En cas d\'utilisation d\'apostrophes, bien mettre le \ avant l\'apostrophe sinon ça foire !<br />Ne pas oublier les deux apostrophes (sans barre) au tout début et à la toute fin aussi.<br />La syntaxe de Docuwiki ne marche pas pas contre.<br />Pour aller à la ligne... voir le code :p :-p :P :-P');" onmouseout="cache();">Passez la souris sur moi !</p>
  
  
 </html> </html>