Displaying ISO Latin Characters

If you’re authoring Web pages by hand, it can be a hassle to remember codes for different characters like á and à. Script 17.8 shows you a list of common variations of the vowels.

To display ISO Latin characters:

1.
var eWin,n,i,j,w,t='<table border=1 cellpadding=20 cellspacing=0>', l=document.createElement('p'),
Start off the bookmarklet by initializing several variables.
2.
v='aAeEiIoOuUyY',
Initialize a string, v, which contains all the vowels.
3.
s=new Array('acute','circ','elig', 'Elig','grave','ring','slash', 'tilde','uml');
Here’s an array, s, which contains all the diacritical character codes.
4.
for(i=0;i<v.length;i++){
This line sets up i to loop through the characters in the v string.
5.
for(j=0;j<s.length;j++){ ...

Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.