begin process at 2010 02 10 05:31:49
  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 :5 087

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

Source avec Zip MOOTABLEAU par Miky76
Source avec Zip CALCULER VOTRE IMC par lesnouesremy
CONSOLE DOS par djebbipgm
Source avec Zip PLUGIN JQUERY ARTE: AJOUTER DU TEMPS REEL SUR VOS PAGES WEB par arthurobriot
FAIRE UN FILTRE DES VILLES par scropfi01

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 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

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,328 sec (4)

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