begin process at 2012 02 06 00:05:58
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Divers

 > AFFICHAGE DES CARACTÈRES SPÉCIAUX DANS UN ALERT

AFFICHAGE DES CARACTÈRES SPÉCIAUX DANS UN ALERT


 Information sur la source

Note :
Aucune note
Catégorie :Divers Niveau :Débutant Date de création :24/07/2002 Date de mise à jour :24/07/2002 18:35:07 Vu :6 309

Auteur : ypothier

Ecrire un message privé
Commentaire sur cette source (1)
Ajouter un commentaire et/ou une note

 Description


Source

  • <title>String.FromCharCode( ) fait par ypothier</title>
  • <!--
  • Tout ce que vous avez a faire, c'est de mettre la valeur ASCII entre les parentheses.
  • -->
  • <html>
  • <body>
  • <script language="JAVASCRIPT">
  • TblStr = new Array(400)
  • for(x=0; x<=400; x++)
  • {
  • TblStr[x] = "" //Initialisation
  • TblStr[x] = String.fromCharCode(x)
  • }
  • document.write('<Table with="100%" align="CENTER" border="0">')
  • document.write('<tr><td align="CENTER" width="100%"><font size=5><b>')
  • document.write('String.fromCharCode(Ascii)')
  • document.write('</b></font></td></tr>')
  • document.write('<tr><td><font size=2>')
  • document.write('Tout ce que vous avez '+String.fromCharCode(224)+' faire, c\'est de mettre la valeur ASCII entre les parenth'+String.fromCharCode(232)+'ses.')
  • document.write('</font></td></tr>')
  • document.write('</table>')
  • document.write('<br>')
  • document.write('<Table width="100%" border="2">')
  • document.write('<tr>')
  • document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
  • document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
  • document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
  • document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
  • document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
  • document.write('</tr>')
  • for(x=0; x<=400; x++)
  • {
  • document.write('<tr>')
  • document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
  • x++;
  • if(x<=400)
  • {
  • document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
  • x++;
  • }
  • else
  • {
  • document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
  • }
  • if(x<=400)
  • {
  • document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
  • x++;
  • }
  • else
  • {
  • document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
  • }
  • if(x<=400)
  • {
  • document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
  • x++;
  • }
  • else
  • {
  • document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
  • }
  • if(x<=400)
  • {
  • document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
  • }
  • else
  • {
  • document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
  • }
  • document.write('</tr>')
  • }
  • document.write('</table>')
  • </script>
  • </body>
  • </html>
<title>String.FromCharCode( ) fait par ypothier</title>
<!--
Tout ce que vous avez a faire, c'est de mettre la valeur ASCII entre les parentheses.
-->
<html>
<body>
<script language="JAVASCRIPT">
TblStr = new Array(400)
for(x=0; x<=400; x++)
{
	TblStr[x] = "" //Initialisation
	TblStr[x] = String.fromCharCode(x)
}

document.write('<Table with="100%" align="CENTER" border="0">')
document.write('<tr><td align="CENTER" width="100%"><font size=5><b>')
document.write('String.fromCharCode(Ascii)')
document.write('</b></font></td></tr>')
document.write('<tr><td><font size=2>')
document.write('Tout ce que vous avez '+String.fromCharCode(224)+' faire, c\'est de mettre la valeur ASCII entre les parenth'+String.fromCharCode(232)+'ses.')
document.write('</font></td></tr>')
document.write('</table>')

document.write('<br>')

document.write('<Table width="100%" border="2">')
document.write('<tr>')
document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
document.write('<td width="10%" align="Center"><b>Ascii</b></td><td width="10%" align="Center"><b>Carac.</b></td>')
document.write('</tr>')
for(x=0; x<=400; x++)
{
document.write('<tr>')

document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
x++;

if(x<=400)
{
	document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
	x++;
}
else
{
	document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
}

if(x<=400)
{
	document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
	x++;
}
else
{
	document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
}

if(x<=400)
{
	document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
	x++;
}
else
{
	document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
}

if(x<=400)
{
	document.write('<td width="10%" align="Center">' + x + '</td><td width="10%" align="Center">' + TblStr[x] + '</td>');
}
else
{
	document.write('<td width="10%" align="Center"></td><td width="10%" align="Center"></td>');
}

document.write('</tr>')
}
document.write('</table>')
</script>
</body>
</html>

 Conclusion

Tout ce que vous avez à faire c'est de mettre le code ascii entre les parenthère. String.fromCharCode(Code_Ascii)


 Sources de la même categorie

COLONNES ADAPTABLES EN HAUTEUR par dronoide
Source avec Zip VECTEURS ET MATRICES: OUTILS GRAPHIQUES UTILES par william voirol
Source avec Zip Source avec une capture HTML5 PLAYER par kazma
Source avec Zip Source avec une capture SCROLLBAR PERSONNALISABLE par kazma
Source avec Zip INFO BULLE par RudiRatlos

Commentaires et avis

Commentaire de Dean le 02/08/2002 01:14:22

Pourquoi spécialement dans un alert() ?
Il n'y a pas plus de restrictions qu'avec les autres méthodes...

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,468 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales