De la belle écriture en Javascript...
variable.big();
L'emploi de .big() affichera la variable
comme si elle était comprise entre les balises Html <BIG></BIG>.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Something"; (str est une variable)
document.write("<BIG>"+str+"</BIG>");
document.write('<BIG>Something</BIG>');
document.write(str.big());
document.write("Something".big());
variable.small();
L'emploi de .small() affichera la variable
comme si elle était comprise entre les balises Html
<SMALL></SMALL>.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Something";
document.write("<SMALL>"+str +"</SMALL>");
document.write("<SMALL>Something" +"</SMALL>");
document.write(str.small());
document.write("Something".small());
variable.blink();
L'emploi de .blink() affichera la variable
comme si elle était comprise entre les balises Html <BLINK></BLINK>.
Pour rappel, cette balise (qui est par ailleurs vite ennuyeuse) n'est
valable que sous Netscape 3 et plus.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Something";
document.write('<BLINK>'+str+'</BLINK>');
document.write("<BLINK>Something</BLINK>");
document.write(str.blink());
document.write("Something".blink());
variable.bold();
L'emploi de .bold() affichera la variable
comme si elle était comprise entre les balises Html
<B></B>.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Some words";
document.write("<B>"+str+"</B>");
document.write("<B>Some words</B>");
document.write(str.bold());
document.write("Some words".bold());
variable.fixed();
L'emploi de .fixed() affichera la variable
comme si elle était comprise entre les balises Html <TT></TT>.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Something";
document.write("<TT>"+str+"</TT>");
document.write("<TT>Something</TT>");
document.write(str.fixed());
document.write("Something".fixed());
variable.italics();
L'emploi de .italics() affichera la variable
comme si elle était comprise entre les balises Html
<I></I>.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Something";
document.write("<I>"+str+"</I>");
document.write("<I>Something</I>");
document.write(str.italics());
document.write("Some word".italics());
variable.fontcolor(color );
L'emploi de .fontcolor(color) affichera la
variable comme si elle était comprise entre les balises Html
<FONT COLOR="color"> </FONT>.
Les quatre instructions Javascript suivantes sont équivalentes
:
str1="Some words";
str2="red";
document.write("<FONT COLOR='red'>" +str1+"</FONT>");
document.write("<FONT COLOR='red'>" +"Something</FONT>");
document.write(str1.fontcolor(str2));
document.write(str1.fontcolor("red"));
variable.fontsize(x);
L'emploi de .fontsize(x) affichera la
variable comme si elle était comprise entre les balises Html
<FONT SIZE="x"></FONT> où x est un nombre de 1
à 7 ou exprimé en plus ou en moins par rapport à 0 par exemple -2,
-1, +1, +2.
Les quatre instructions Javascript suivantes sont équivalentes :
str="Something";
x=3;
document.write("<FONT SIZE=3>" +str+"</FONT>");
document.write("<FONT SIZE=3>" +"Something</FONT>");
document.write(str.fontsize(3));
document.write(str.fontsize(x));
variable.strike();
L'emploi de .strike() affichera la variable
comme si elle était comprise entre les balises Html
<STRIKE></STRIKE>.
Les quatre instructions Javascript suivantes sont équivalentes
:
str="Something";
document.write("<STRIKE>"+str +"</STRIKE>");
document.write("<STRIKE>Something" +"</STRIKE>");
document.write(str.strike());
document.write("Something".strike());
variable.sub();
L'emploi de .sub() affichera la variable
comme si elle était comprise entre les balises Html
<SUB></SUB>.
Les quatre instructions Javascript suivantes sont équivalentes
:
str="Something";
document.write("<SUB>"+str+"</SUB>");
document.write("<SUB>Something" +"</SUB>");
document.write(str.sub());
document.write("Something".sub());
variable.sup();
L'emploi de .sup() affichera la variable
comme si elle était comprise entre les balises Html .
<SUP></SUB>.
Les quatre instructions Javascript suivantes sont équivalentes
:
str="Something";
document.write("<SUP>"+str+"</SUP>");
document.write("<SUP>Something</SUP>");
document.write(str.sup());
document.write("Something".sup());

|